Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3172)

Unified Diff: chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc

Issue 22455002: linux_aura: Implement the static part of the dbus menu for Unity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The gyp fix Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
index f1c300273b2e07fd0c95143759dc34651346e40a..b7f3fdbcceae989f0d374e4f129dc3e8f04581d9 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_x11.cc
@@ -10,10 +10,12 @@
BrowserDesktopRootWindowHostX11::BrowserDesktopRootWindowHostX11(
views::internal::NativeWidgetDelegate* native_widget_delegate,
views::DesktopNativeWidgetAura* desktop_native_widget_aura,
- const gfx::Rect& initial_bounds)
+ const gfx::Rect& initial_bounds,
+ BrowserView* browser_view)
: DesktopRootWindowHostX11(native_widget_delegate,
- desktop_native_widget_aura,
- initial_bounds) {
+ desktop_native_widget_aura,
+ initial_bounds),
+ browser_view_(browser_view) {
}
BrowserDesktopRootWindowHostX11::~BrowserDesktopRootWindowHostX11() {
@@ -37,6 +39,28 @@ bool BrowserDesktopRootWindowHostX11::UsesNativeSystemMenu() const {
}
////////////////////////////////////////////////////////////////////////////////
+// BrowserDesktopRootWindowHostX11,
+// views::DesktopRootWindowHostX11 implementation:
+
+aura::RootWindow* BrowserDesktopRootWindowHostX11::Init(
+ aura::Window* content_window,
+ const views::Widget::InitParams& params) {
+ aura::RootWindow* root_window = views::DesktopRootWindowHostX11::Init(
+ content_window, params);
+
+ // We have now created our backing X11 window. We now need to (possibly)
+ // alert Unity that there's a menu bar attached to it.
+ global_menu_bar_x11_.reset(new GlobalMenuBarX11(browser_view_, this));
+
+ return root_window;
+}
+
+void BrowserDesktopRootWindowHostX11::CloseNow() {
+ global_menu_bar_x11_.reset();
+ DesktopRootWindowHostX11::CloseNow();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// BrowserDesktopRootWindowHost, public:
// static
@@ -48,6 +72,7 @@ BrowserDesktopRootWindowHost*
BrowserView* browser_view,
BrowserFrame* browser_frame) {
return new BrowserDesktopRootWindowHostX11(native_widget_delegate,
- desktop_native_widget_aura,
- initial_bounds);
+ desktop_native_widget_aura,
+ initial_bounds,
+ browser_view);
}

Powered by Google App Engine
This is Rietveld 408576698