NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / browser_desktop_window_tree_host_x11.cc
bloba60608b6bc2a01e4af65f568dd4403ded5eb5217
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 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.h"
7 ////////////////////////////////////////////////////////////////////////////////
8 // BrowserDesktopWindowTreeHostX11, public:
10 BrowserDesktopWindowTreeHostX11::BrowserDesktopWindowTreeHostX11(
11 views::internal::NativeWidgetDelegate* native_widget_delegate,
12 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
13 BrowserView* browser_view)
14 : DesktopWindowTreeHostX11(native_widget_delegate,
15 desktop_native_widget_aura),
16 browser_view_(browser_view) {
19 BrowserDesktopWindowTreeHostX11::~BrowserDesktopWindowTreeHostX11() {
22 ////////////////////////////////////////////////////////////////////////////////
23 // BrowserDesktopWindowTreeHostX11,
24 // BrowserDesktopWindowTreeHost implementation:
26 views::DesktopWindowTreeHost*
27 BrowserDesktopWindowTreeHostX11::AsDesktopWindowTreeHost() {
28 return this;
31 int BrowserDesktopWindowTreeHostX11::GetMinimizeButtonOffset() const {
32 return 0;
35 bool BrowserDesktopWindowTreeHostX11::UsesNativeSystemMenu() const {
36 return false;
39 ////////////////////////////////////////////////////////////////////////////////
40 // BrowserDesktopWindowTreeHostX11,
41 // views::DesktopWindowTreeHostX11 implementation:
43 void BrowserDesktopWindowTreeHostX11::Init(
44 aura::Window* content_window,
45 const views::Widget::InitParams& params,
46 aura::RootWindow::CreateParams* rw_create_params) {
47 views::DesktopWindowTreeHostX11::Init(content_window, params,
48 rw_create_params);
50 // We have now created our backing X11 window. We now need to (possibly)
51 // alert Unity that there's a menu bar attached to it.
52 global_menu_bar_x11_.reset(new GlobalMenuBarX11(browser_view_, this));
55 void BrowserDesktopWindowTreeHostX11::CloseNow() {
56 global_menu_bar_x11_.reset();
57 DesktopWindowTreeHostX11::CloseNow();
60 ////////////////////////////////////////////////////////////////////////////////
61 // BrowserDesktopWindowTreeHost, public:
63 // static
64 BrowserDesktopWindowTreeHost*
65 BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(
66 views::internal::NativeWidgetDelegate* native_widget_delegate,
67 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
68 BrowserView* browser_view,
69 BrowserFrame* browser_frame) {
70 return new BrowserDesktopWindowTreeHostX11(native_widget_delegate,
71 desktop_native_widget_aura,
72 browser_view);