win: Add BrowserWindow.setMenu API.

This commit is contained in:
Cheng Zhao 2013-10-02 21:24:21 +08:00
parent 2024ae5dba
commit 5a6ff0f80d
7 changed files with 54 additions and 1 deletions

View file

@ -12,6 +12,10 @@
#include "ui/gfx/size.h"
#include "ui/views/widget/widget_delegate.h"
namespace ui {
class MenuModel;
}
namespace views {
class WebView;
class Widget;
@ -19,6 +23,8 @@ class Widget;
namespace atom {
class Menu2;
class NativeWindowWin : public NativeWindow,
public views::WidgetDelegate {
public:
@ -60,6 +66,9 @@ class NativeWindowWin : public NativeWindow,
virtual bool IsKiosk() OVERRIDE;
virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
// Set the native window menu.
void SetMenu(ui::MenuModel* menu_model);
SkRegion* draggable_region() { return draggable_region_.get(); }
protected:
@ -89,6 +98,9 @@ class NativeWindowWin : public NativeWindow,
scoped_ptr<views::Widget> window_;
views::WebView* web_view_; // managed by window_.
// The window menu.
scoped_ptr<atom::Menu2> menu_;
scoped_ptr<SkRegion> draggable_region_;
bool resizable_;