linux: Add support for unity global menubar.

This commit is contained in:
Cheng Zhao 2014-07-11 08:57:19 +08:00
parent 3349b8e6c7
commit 7e86e53593
7 changed files with 605 additions and 0 deletions

View file

@ -15,12 +15,15 @@
#include "ui/views/widget/widget_observer.h"
namespace views {
class DesktopWindowTreeHostX11;
class UnhandledKeyboardEventHandler;
class Widget;
}
namespace atom {
class GlobalMenuBarX11;
class NativeWindowViews : public NativeWindow,
public views::WidgetDelegateView,
public views::WidgetObserver {
@ -72,6 +75,10 @@ class NativeWindowViews : public NativeWindow,
SkRegion* draggable_region() const { return draggable_region_.get(); }
views::Widget* widget() const { return window_.get(); }
#if defined(USE_X11)
views::DesktopWindowTreeHostX11* host() const { return host_; }
#endif
private:
// NativeWindow:
virtual void UpdateDraggableRegions(
@ -114,6 +121,11 @@ class NativeWindowViews : public NativeWindow,
scoped_ptr<views::Widget> window_;
views::View* web_view_; // Managed by inspectable_web_contents_.
#if defined(USE_X11)
views::DesktopWindowTreeHostX11* host_; // Managed by native_widget.
scoped_ptr<GlobalMenuBarX11> global_menu_bar_;
#endif
// Handles unhandled keyboard messages coming back from the renderer process.
scoped_ptr<views::UnhandledKeyboardEventHandler> keyboard_event_handler_;