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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_root_window_host.h

Issue 31043006: Moves creation of various clients to DesktopNativeWidgetAura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve merge 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/aura/root_window.h"
9 #include "ui/base/ui_base_types.h" 10 #include "ui/base/ui_base_types.h"
10 #include "ui/views/views_export.h" 11 #include "ui/views/views_export.h"
11 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
12 13
13 namespace aura { 14 namespace aura {
14 class RootWindowHost; 15 class RootWindowHost;
15 class Window; 16 class Window;
17
18 namespace client {
19 class DragDropClient;
20 }
16 } 21 }
17 22
18 namespace gfx { 23 namespace gfx {
19 class ImageSkia; 24 class ImageSkia;
20 class Rect; 25 class Rect;
21 } 26 }
22 27
23 namespace ui { 28 namespace ui {
24 class NativeTheme; 29 class NativeTheme;
25 } 30 }
26 31
27 namespace views { 32 namespace views {
28 namespace corewm { 33 namespace corewm {
34
29 class Tooltip; 35 class Tooltip;
30 } 36 }
37
31 namespace internal { 38 namespace internal {
32 class NativeWidgetDelegate; 39 class NativeWidgetDelegate;
33 } 40 }
41
42 class DesktopNativeCursorManager;
34 class DesktopNativeWidgetAura; 43 class DesktopNativeWidgetAura;
35 44
36 class VIEWS_EXPORT DesktopRootWindowHost { 45 class VIEWS_EXPORT DesktopRootWindowHost {
37 public: 46 public:
38 virtual ~DesktopRootWindowHost() {} 47 virtual ~DesktopRootWindowHost() {}
39 48
40 static DesktopRootWindowHost* Create( 49 static DesktopRootWindowHost* Create(
41 internal::NativeWidgetDelegate* native_widget_delegate, 50 internal::NativeWidgetDelegate* native_widget_delegate,
42 DesktopNativeWidgetAura* desktop_native_widget_aura, 51 DesktopNativeWidgetAura* desktop_native_widget_aura);
43 const gfx::Rect& initial_bounds);
44 52
45 // Return the NativeTheme to use for |window|. WARNING: |window| may be NULL. 53 // Return the NativeTheme to use for |window|. WARNING: |window| may be NULL.
46 static ui::NativeTheme* GetNativeTheme(aura::Window* window); 54 static ui::NativeTheme* GetNativeTheme(aura::Window* window);
47 55
48 // Creates the aura resources associated with the native window we built. 56 // Sets up resources needed before the RootWindow has been created.
49 // Caller takes ownership of returned RootWindow. 57 virtual void Init(aura::Window* content_window,
50 virtual aura::RootWindow* Init(aura::Window* content_window, 58 const Widget::InitParams& params,
51 const Widget::InitParams& params) = 0; 59 aura::RootWindow::CreateParams* rw_create_params) = 0;
60
61 // Invoked once the RootWindow has been created. Caller owns the RootWindow.
62 virtual void OnRootWindowCreated(aura::RootWindow* root,
63 const Widget::InitParams& params) = 0;
52 64
53 // Creates and returns the Tooltip implementation to use. Return value is 65 // Creates and returns the Tooltip implementation to use. Return value is
54 // owned by DesktopNativeWidgetAura and lives as long as 66 // owned by DesktopNativeWidgetAura and lives as long as
55 // DesktopRootWindowHost. 67 // DesktopRootWindowHost.
56 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0; 68 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0;
57 69
70 // Creates and returns the DragDropClient implementation to use. Return value
71 // is owned by DesktopNativeWidgetAura and lives as long as
72 // DesktopRootWindowHost.
73 virtual scoped_ptr<aura::client::DragDropClient> CreateDragDropClient(
74 DesktopNativeCursorManager* cursor_manager) = 0;
75
58 virtual void Close() = 0; 76 virtual void Close() = 0;
59 virtual void CloseNow() = 0; 77 virtual void CloseNow() = 0;
60 78
61 virtual aura::RootWindowHost* AsRootWindowHost() = 0; 79 virtual aura::RootWindowHost* AsRootWindowHost() = 0;
62 80
63 virtual void ShowWindowWithState(ui::WindowShowState show_state) = 0; 81 virtual void ShowWindowWithState(ui::WindowShowState show_state) = 0;
64 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0; 82 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0;
65 83
66 virtual bool IsVisible() const = 0; 84 virtual bool IsVisible() const = 0;
67 85
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 virtual void OnNativeWidgetBlur() = 0; 145 virtual void OnNativeWidgetBlur() = 0;
128 146
129 // Returns true if the Widget was closed but is still showing because of 147 // Returns true if the Widget was closed but is still showing because of
130 // animations. 148 // animations.
131 virtual bool IsAnimatingClosed() const = 0; 149 virtual bool IsAnimatingClosed() const = 0;
132 }; 150 };
133 151
134 } // namespace views 152 } // namespace views
135 153
136 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ 154 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698