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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_root_window_host.h
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host.h b/ui/views/widget/desktop_aura/desktop_root_window_host.h
index bd2816e4fd7bf90c9d1ce8442d2bd9ab89cd8776..ad904fac6577c5e21055d5b09db036b7a94ceae1 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host.h
@@ -6,6 +6,7 @@
#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_
#include "base/memory/scoped_ptr.h"
+#include "ui/aura/root_window.h"
#include "ui/base/ui_base_types.h"
#include "ui/views/views_export.h"
#include "ui/views/widget/widget.h"
@@ -13,6 +14,10 @@
namespace aura {
class RootWindowHost;
class Window;
+
+namespace client {
+class DragDropClient;
+}
}
namespace gfx {
@@ -26,11 +31,15 @@ class NativeTheme;
namespace views {
namespace corewm {
+
class Tooltip;
}
+
namespace internal {
class NativeWidgetDelegate;
}
+
+class DesktopNativeCursorManager;
class DesktopNativeWidgetAura;
class VIEWS_EXPORT DesktopRootWindowHost {
@@ -39,22 +48,31 @@ class VIEWS_EXPORT DesktopRootWindowHost {
static DesktopRootWindowHost* Create(
internal::NativeWidgetDelegate* native_widget_delegate,
- DesktopNativeWidgetAura* desktop_native_widget_aura,
- const gfx::Rect& initial_bounds);
+ DesktopNativeWidgetAura* desktop_native_widget_aura);
// Return the NativeTheme to use for |window|. WARNING: |window| may be NULL.
static ui::NativeTheme* GetNativeTheme(aura::Window* window);
- // Creates the aura resources associated with the native window we built.
- // Caller takes ownership of returned RootWindow.
- virtual aura::RootWindow* Init(aura::Window* content_window,
- const Widget::InitParams& params) = 0;
+ // Sets up resources needed before the RootWindow has been created.
+ virtual void Init(aura::Window* content_window,
+ const Widget::InitParams& params,
+ aura::RootWindow::CreateParams* rw_create_params) = 0;
+
+ // Invoked once the RootWindow has been created. Caller owns the RootWindow.
+ virtual void OnRootWindowCreated(aura::RootWindow* root,
+ const Widget::InitParams& params) = 0;
// Creates and returns the Tooltip implementation to use. Return value is
// owned by DesktopNativeWidgetAura and lives as long as
// DesktopRootWindowHost.
virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0;
+ // Creates and returns the DragDropClient implementation to use. Return value
+ // is owned by DesktopNativeWidgetAura and lives as long as
+ // DesktopRootWindowHost.
+ virtual scoped_ptr<aura::client::DragDropClient> CreateDragDropClient(
+ DesktopNativeCursorManager* cursor_manager) = 0;
+
virtual void Close() = 0;
virtual void CloseNow() = 0;

Powered by Google App Engine
This is Rietveld 408576698