Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / browser_desktop_window_tree_host_x11.h
blobed1d095f5d887934f0620d8b1e47878051caef8c
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 "chrome/browser/ui/views/frame/browser_desktop_window_tree_host.h"
9 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h"
10 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
12 class BrowserFrame;
13 class BrowserView;
15 namespace views {
16 class DesktopNativeWidgetAura;
19 class BrowserDesktopWindowTreeHostX11
20 : public BrowserDesktopWindowTreeHost,
21 public views::DesktopWindowTreeHostX11 {
22 public:
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 ~BrowserDesktopWindowTreeHostX11() override;
30 private:
31 // Overridden from BrowserDesktopWindowTreeHost:
32 DesktopWindowTreeHost* AsDesktopWindowTreeHost() override;
33 int GetMinimizeButtonOffset() const override;
34 bool UsesNativeSystemMenu() const override;
36 // Overridden from views::DesktopWindowTreeHostX11:
37 void Init(aura::Window* content_window,
38 const views::Widget::InitParams& params) override;
39 void CloseNow() override;
41 BrowserView* browser_view_;
43 // Each browser frame maintains its own menu bar object because the lower
44 // level dbus protocol associates a xid to a menu bar; we can't map multiple
45 // xids to the same menu bar.
46 scoped_ptr<GlobalMenuBarX11> global_menu_bar_x11_;
48 DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostX11);
51 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_WINDOW_TREE_HOST_X11_H_