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

Side by Side Diff: chrome/browser/ui/views/frame/browser_desktop_root_window_host_ozone.h

Issue 36953002: views: Support Desktop Aura creation on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implementing with DesktopRootWindowHostOzone class instead Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_OZONE_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_OZONE_H_
7 7
8 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" 8 #include "ui/views/widget/desktop_aura/desktop_root_window_host_ozone.h"
9 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host.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 10
12 class BrowserFrame;
13 class BrowserView; 11 class BrowserView;
14 12
15 namespace views { 13 namespace views {
16 class DesktopNativeWidgetAura; 14 class DesktopNativeWidgetAura;
17 } 15 }
18 16
19 class BrowserDesktopRootWindowHostX11 17 class BrowserDesktopRootWindowHostOzone
20 : public BrowserDesktopRootWindowHost, 18 : public BrowserDesktopRootWindowHost,
21 public views::DesktopRootWindowHostX11 { 19 public views::DesktopRootWindowHostOzone {
22 public: 20 public:
23 BrowserDesktopRootWindowHostX11( 21 BrowserDesktopRootWindowHostOzone(
24 views::internal::NativeWidgetDelegate* native_widget_delegate, 22 views::internal::NativeWidgetDelegate* native_widget_delegate,
25 views::DesktopNativeWidgetAura* desktop_native_widget_aura, 23 views::DesktopNativeWidgetAura* desktop_native_widget_aura,
26 BrowserView* browser_view); 24 BrowserView* browser_view);
27 virtual ~BrowserDesktopRootWindowHostX11(); 25 virtual ~BrowserDesktopRootWindowHostOzone();
28 26
29 private: 27 private:
30 // Overridden from BrowserDesktopRootWindowHost: 28 // Overridden from BrowserDesktopRootWindowHost:
31 virtual DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE; 29 virtual views::DesktopRootWindowHost* AsDesktopRootWindowHost() OVERRIDE;
32 virtual int GetMinimizeButtonOffset() const OVERRIDE; 30 virtual int GetMinimizeButtonOffset() const OVERRIDE;
33 virtual bool UsesNativeSystemMenu() const OVERRIDE; 31 virtual bool UsesNativeSystemMenu() const OVERRIDE;
34 32
35 // Overridden from views::DesktopRootWindowHostX11: 33 // Overridden from views::DesktopRootWindowHostOzone:
36 virtual void Init( 34 virtual void Init(
37 aura::Window* content_window, 35 aura::Window* content_window,
38 const views::Widget::InitParams& params, 36 const views::Widget::InitParams& params,
39 aura::RootWindow::CreateParams* rw_create_params) OVERRIDE; 37 aura::RootWindow::CreateParams* rw_create_params) OVERRIDE;
40 virtual void CloseNow() OVERRIDE; 38 virtual void CloseNow() OVERRIDE;
41 39
42 BrowserView* browser_view_; 40 DISALLOW_COPY_AND_ASSIGN(BrowserDesktopRootWindowHostOzone);
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 }; 41 };
51 42
52 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 43 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_DESKTOP_ROOT_WINDOW_HOST_OZONE_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698