]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix compilation under Linux.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 23 Apr 2014 04:45:48 +0000 (12:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 23 Apr 2014 04:45:48 +0000 (12:45 +0800)
atom/browser/api/atom_api_menu_gtk.cc
atom/browser/api/atom_api_menu_gtk.h
atom/browser/api/atom_api_menu_win.h
atom/common/native_mate_converters/string16_converter.h

index dff0b0326bc5b3fc2d64d5e36313f0d3f97fa459..28f36ac3e1f609352a73cdeef55fa483c760b126 100644 (file)
@@ -22,7 +22,7 @@ void MenuGtk::Popup(Window* window) {
   uint32_t triggering_event_time;
   gfx::Point point;
 
-  BrowserWindow* native_window = window->window();
+  NativeWindow* native_window = window->window();
   GdkEventButton* event = native_window->GetWebContents()->
       GetRenderWidgetHostView()->GetLastMouseDown();
   if (event) {
index 1a2bbdd9ba6aff0b9804d6fe7628b02753d7de1d..65aab47923d5967525e692539db30f129d3aff32 100644 (file)
@@ -14,12 +14,13 @@ namespace api {
 
 class MenuGtk : public Menu,
                 public ::MenuGtk::Delegate {
+ public:
+  MenuGtk();
+
  protected:
   virtual void Popup(Window* window) OVERRIDE;
 
  private:
-  MenuGtk();
-
   scoped_ptr<::MenuGtk> menu_gtk_;
 
   DISALLOW_COPY_AND_ASSIGN(MenuGtk);
index eed70035910572e520a17c1bde8b02f744338b12..2d4344fd99391a199674cf4b1aa298075941d6d2 100644 (file)
@@ -14,12 +14,13 @@ class Menu2;
 namespace api {
 
 class MenuWin : public Menu {
+ public:
+  MenuWin();
+
  protected:
   virtual void Popup(Window* window) OVERRIDE;
 
  private:
-  MenuWin();
-
   scoped_ptr<atom::Menu2> menu_;
 
   DISALLOW_COPY_AND_ASSIGN(MenuWin);
index a3b360fd674467be9b24cbc552d2fda920e86b61..7c3049318665f8578bd3bd541791c2155c075dac 100644 (file)
@@ -21,7 +21,7 @@ struct Converter<string16> {
                      v8::Handle<v8::Value> val,
                      string16* out) {
     v8::String::Value s(val);
-    *out = string16(reinterpret_cast<const char16*>(*s), s.length());
+    out->assign(reinterpret_cast<const char16*>(*s), s.length());
     return true;
   }
 };