Fix compilation under Linux.

This commit is contained in:
Cheng Zhao 2014-04-23 12:45:48 +08:00
parent 297ccbbe58
commit 0c9aea3308
4 changed files with 8 additions and 6 deletions

View file

@ -22,7 +22,7 @@ void MenuGtk::Popup(Window* window) {
uint32_t triggering_event_time; uint32_t triggering_event_time;
gfx::Point point; gfx::Point point;
BrowserWindow* native_window = window->window(); NativeWindow* native_window = window->window();
GdkEventButton* event = native_window->GetWebContents()-> GdkEventButton* event = native_window->GetWebContents()->
GetRenderWidgetHostView()->GetLastMouseDown(); GetRenderWidgetHostView()->GetLastMouseDown();
if (event) { if (event) {

View file

@ -14,12 +14,13 @@ namespace api {
class MenuGtk : public Menu, class MenuGtk : public Menu,
public ::MenuGtk::Delegate { public ::MenuGtk::Delegate {
public:
MenuGtk();
protected: protected:
virtual void Popup(Window* window) OVERRIDE; virtual void Popup(Window* window) OVERRIDE;
private: private:
MenuGtk();
scoped_ptr<::MenuGtk> menu_gtk_; scoped_ptr<::MenuGtk> menu_gtk_;
DISALLOW_COPY_AND_ASSIGN(MenuGtk); DISALLOW_COPY_AND_ASSIGN(MenuGtk);

View file

@ -14,12 +14,13 @@ class Menu2;
namespace api { namespace api {
class MenuWin : public Menu { class MenuWin : public Menu {
public:
MenuWin();
protected: protected:
virtual void Popup(Window* window) OVERRIDE; virtual void Popup(Window* window) OVERRIDE;
private: private:
MenuWin();
scoped_ptr<atom::Menu2> menu_; scoped_ptr<atom::Menu2> menu_;
DISALLOW_COPY_AND_ASSIGN(MenuWin); DISALLOW_COPY_AND_ASSIGN(MenuWin);

View file

@ -21,7 +21,7 @@ struct Converter<string16> {
v8::Handle<v8::Value> val, v8::Handle<v8::Value> val,
string16* out) { string16* out) {
v8::String::Value s(val); 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; return true;
} }
}; };