1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 7 8 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" 9 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host.h" 10 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h" 11 12 class BrowserFrame; 13 class BrowserView; 14 15 namespace views { 16 class DesktopNativeWidgetAura; 17 } 18 19 class BrowserDesktopRootWindowHostX11 20 : public BrowserDesktopRootWindowHost, 21 public views::DesktopRootWindowHostX11 { 22 public: 23 BrowserDesktopRootWindowHostX11( 24 views::internal::NativeWidgetDelegate* native_widget_delegate, 25 views::DesktopNativeWidgetAura* desktop_native_widget_aura, 26 const gfx::Rect& initial_bounds, 27 BrowserView* browser_view); 28 virtual ~BrowserDesktopRootWindowHostX11(); 29 30 private: 31 // Overridden from BrowserDesktopRootWindowHost: 32 virtual DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE; 33 virtual int GetMinimizeButtonOffset() const OVERRIDE; 34 virtual bool UsesNativeSystemMenu() const OVERRIDE; 35 36 // Overridden from views::DesktopRootWindowHostX11: 37 virtual aura::RootWindow* Init( 38 aura::Window* content_window, 39 const views::Widget::InitParams& params) OVERRIDE; 40 virtual void CloseNow() OVERRIDE; 41 42 BrowserView* browser_view_; 43 44 // Each browser frame maintains its own menu bar object because the lower 45 // level dbus protocol associates a xid to a menu bar; we can't map multiple 46 // xids to the same menu bar. 47 scoped_ptr<GlobalMenuBarX11> global_menu_bar_x11_; 48 49 DISALLOW_COPY_AND_ASSIGN(BrowserDesktopRootWindowHostX11); 50 }; 51 52 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 53