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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_WINDOW_TREE_HOST_X11_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_WINDOW_TREE_HOST_X11_H_
8 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
9 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host.h"
10 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h"
16 class DesktopNativeWidgetAura
;
19 class BrowserDesktopWindowTreeHostX11
20 : public BrowserDesktopWindowTreeHost
,
21 public views::DesktopWindowTreeHostX11
{
23 BrowserDesktopWindowTreeHostX11(
24 views::internal::NativeWidgetDelegate
* native_widget_delegate
,
25 views::DesktopNativeWidgetAura
* desktop_native_widget_aura
,
26 BrowserView
* browser_view
,
27 BrowserFrame
* browser_frame
);
28 virtual ~BrowserDesktopWindowTreeHostX11();
31 // Overridden from BrowserDesktopWindowTreeHost:
32 virtual DesktopWindowTreeHost
* AsDesktopWindowTreeHost() OVERRIDE
;
33 virtual int GetMinimizeButtonOffset() const OVERRIDE
;
34 virtual bool UsesNativeSystemMenu() const OVERRIDE
;
36 // Overridden from views::DesktopWindowTreeHostX11:
38 aura::Window
* content_window
,
39 const views::Widget::InitParams
& params
) OVERRIDE
;
40 virtual void CloseNow() OVERRIDE
;
42 BrowserView
* browser_view_
;
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_
;
49 DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostX11
);
52 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_WINDOW_TREE_HOST_X11_H_