diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 19:21:16 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 19:21:16 +0000 |
commit | 1467617015bae6becd7a2a11a22f417f3fde0ec3 (patch) | |
tree | 3749c49ca65f141b3effaa1c39f02cd39804209d /ui | |
parent | f80e2c9d07b4dc00b0e4ea8e7d458f1468c2ea2a (diff) | |
download | chromium_src-1467617015bae6becd7a2a11a22f417f3fde0ec3.zip chromium_src-1467617015bae6becd7a2a11a22f417f3fde0ec3.tar.gz chromium_src-1467617015bae6becd7a2a11a22f417f3fde0ec3.tar.bz2 |
Revert 167431 - reland of https://codereview.chromium.org/11364053/
Two changes from that CL:
- Don't remove per-RootWindow StackingClient (erg thought he probably needed it; if not I can remove it later in a separate CL)
- Fix initialization in Shell::PlatformInitialize (wasn't initializing correctly in the CrOS case), diff between ps1 and ps2 in content/shell/shell_aura.cc
TBR=ben@chromium.org
BUG=128578
Review URL: https://codereview.chromium.org/11362216
TBR=scottmg@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/aura/client/stacking_client.h | 10 | ||||
-rw-r--r-- | ui/aura/demo/demo_main.cc | 3 | ||||
-rw-r--r-- | ui/aura/desktop/desktop_stacking_client.cc | 4 | ||||
-rw-r--r-- | ui/aura/desktop/desktop_stacking_client.h | 3 | ||||
-rw-r--r-- | ui/aura/test/test_stacking_client.cc | 3 | ||||
-rw-r--r-- | ui/aura/test/test_stacking_client.h | 3 | ||||
-rw-r--r-- | ui/aura/window.cc | 3 | ||||
-rw-r--r-- | ui/views/examples/content_client/examples_browser_main_parts.cc | 1 | ||||
-rw-r--r-- | ui/views/widget/desktop_native_widget_aura.cc | 3 | ||||
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 2 | ||||
-rw-r--r-- | ui/views/widget/widget.cc | 6 | ||||
-rw-r--r-- | ui/views/widget/widget.h | 4 |
12 files changed, 13 insertions, 32 deletions
diff --git a/ui/aura/client/stacking_client.h b/ui/aura/client/stacking_client.h index 8da3ca3..671c755 100644 --- a/ui/aura/client/stacking_client.h +++ b/ui/aura/client/stacking_client.h @@ -21,15 +21,10 @@ class AURA_EXPORT StackingClient { virtual ~StackingClient() {} // Called by the Window when its parent is set to NULL, returns the window - // that |window| should be added to instead. |context| provides a Window - // (generally a RootWindow) that can be used to determine which desktop type - // the default parent should be chosen from. + // that |window| should be added to instead. // NOTE: this may have side effects. It should only be used when |window| is // going to be immediately added. - virtual Window* GetDefaultParent( - Window* context, - Window* window, - const gfx::Rect& bounds) = 0; + virtual Window* GetDefaultParent(Window* window, const gfx::Rect& bounds) = 0; }; // Set/Get the default stacking client. @@ -45,7 +40,6 @@ AURA_EXPORT void SetStackingClient(Window* window, StackingClient* stacking_client); AURA_EXPORT StackingClient* GetStackingClient(Window* window); - } // namespace client } // namespace aura diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc index 46dbe72..451affb5 100644 --- a/ui/aura/demo/demo_main.cc +++ b/ui/aura/demo/demo_main.cc @@ -100,8 +100,7 @@ class DemoStackingClient : public aura::client::StackingClient { } // Overridden from aura::client::StackingClient: - virtual aura::Window* GetDefaultParent(aura::Window* context, - aura::Window* window, + virtual aura::Window* GetDefaultParent(aura::Window* window, const gfx::Rect& bounds) OVERRIDE { if (!capture_client_.get()) { capture_client_.reset( diff --git a/ui/aura/desktop/desktop_stacking_client.cc b/ui/aura/desktop/desktop_stacking_client.cc index 6b79ea6..ccc7795 100644 --- a/ui/aura/desktop/desktop_stacking_client.cc +++ b/ui/aura/desktop/desktop_stacking_client.cc @@ -17,6 +17,7 @@ namespace aura { DesktopStackingClient::DesktopStackingClient() : window_event_filter_(NULL) { + client::SetStackingClient(this); } DesktopStackingClient::~DesktopStackingClient() { @@ -26,8 +27,7 @@ DesktopStackingClient::~DesktopStackingClient() { client::SetStackingClient(NULL); } -Window* DesktopStackingClient::GetDefaultParent(Window* context, - Window* window, +Window* DesktopStackingClient::GetDefaultParent(Window* window, const gfx::Rect& bounds) { if (!null_parent_.get()) CreateNULLParent(); diff --git a/ui/aura/desktop/desktop_stacking_client.h b/ui/aura/desktop/desktop_stacking_client.h index ea3bec6..ab3e849 100644 --- a/ui/aura/desktop/desktop_stacking_client.h +++ b/ui/aura/desktop/desktop_stacking_client.h @@ -37,8 +37,7 @@ class VIEWS_EXPORT DesktopStackingClient : public client::StackingClient { virtual ~DesktopStackingClient(); // Overridden from client::StackingClient: - virtual Window* GetDefaultParent(Window* context, - Window* window, + virtual Window* GetDefaultParent(Window* window, const gfx::Rect& bounds) OVERRIDE; private: diff --git a/ui/aura/test/test_stacking_client.cc b/ui/aura/test/test_stacking_client.cc index 6dd5dcf..c45537e 100644 --- a/ui/aura/test/test_stacking_client.cc +++ b/ui/aura/test/test_stacking_client.cc @@ -18,8 +18,7 @@ TestStackingClient::~TestStackingClient() { client::SetStackingClient(NULL); } -Window* TestStackingClient::GetDefaultParent(Window* context, - Window* window, +Window* TestStackingClient::GetDefaultParent(Window* window, const gfx::Rect& bounds) { return root_window_; } diff --git a/ui/aura/test/test_stacking_client.h b/ui/aura/test/test_stacking_client.h index 7c9747b..b5963ce 100644 --- a/ui/aura/test/test_stacking_client.h +++ b/ui/aura/test/test_stacking_client.h @@ -20,8 +20,7 @@ class TestStackingClient : public client::StackingClient { virtual ~TestStackingClient(); // Overridden from client::StackingClient: - virtual Window* GetDefaultParent(Window* context, - Window* window, + virtual Window* GetDefaultParent(Window* window, const gfx::Rect& bounds) OVERRIDE; private: diff --git a/ui/aura/window.cc b/ui/aura/window.cc index 6303b76..217e38e1 100644 --- a/ui/aura/window.cc +++ b/ui/aura/window.cc @@ -40,8 +40,7 @@ Window* GetParentForWindow(Window* window, Window* suggested_parent) { if (suggested_parent) return suggested_parent; if (client::GetStackingClient()) - return client::GetStackingClient()->GetDefaultParent( - window, window, gfx::Rect()); + return client::GetStackingClient()->GetDefaultParent(window, gfx::Rect()); return NULL; } diff --git a/ui/views/examples/content_client/examples_browser_main_parts.cc b/ui/views/examples/content_client/examples_browser_main_parts.cc index 2c371f1..462b0675 100644 --- a/ui/views/examples/content_client/examples_browser_main_parts.cc +++ b/ui/views/examples/content_client/examples_browser_main_parts.cc @@ -43,7 +43,6 @@ void ExamplesBrowserMainParts::PreMainMessageLoopRun() { #if defined(USE_AURA) aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager); stacking_client_.reset(new DesktopStackingClient); - aura::client::SetStackingClient(stacking_client_.get()); gfx::Screen::SetScreenInstance( gfx::SCREEN_TYPE_NATIVE, CreateDesktopScreen()); #endif diff --git a/ui/views/widget/desktop_native_widget_aura.cc b/ui/views/widget/desktop_native_widget_aura.cc index c39f84f..cb5058e 100644 --- a/ui/views/widget/desktop_native_widget_aura.cc +++ b/ui/views/widget/desktop_native_widget_aura.cc @@ -43,8 +43,7 @@ class DesktopNativeWidgetAuraStackingClient : } // Overridden from client::StackingClient: - virtual aura::Window* GetDefaultParent(aura::Window* context, - aura::Window* window, + virtual aura::Window* GetDefaultParent(aura::Window* window, const gfx::Rect& bounds) OVERRIDE { return root_window_; } diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index c395ca5..1c47e75 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -124,7 +124,7 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { // the |window_| using the desired |window_bounds|. if (!parent) { parent = aura::client::GetStackingClient(params.GetParent())-> - GetDefaultParent(params.context, window_, window_bounds); + GetDefaultParent(window_, window_bounds); } else if (window_bounds == gfx::Rect()) { // If a parent is specified but no bounds are given, // use the origin of the parent's display so that the widget diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc index 6226b3a..d0c71ef 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc @@ -159,8 +159,7 @@ Widget::InitParams::InitParams() native_widget(NULL), desktop_root_window_host(NULL), top_level(false), - layer_type(ui::LAYER_TEXTURED), - context(NULL) { + layer_type(ui::LAYER_TEXTURED) { } Widget::InitParams::InitParams(Type type) @@ -185,8 +184,7 @@ Widget::InitParams::InitParams(Type type) native_widget(NULL), desktop_root_window_host(NULL), top_level(false), - layer_type(ui::LAYER_TEXTURED), - context(NULL) { + layer_type(ui::LAYER_TEXTURED) { } gfx::NativeView Widget::InitParams::GetParent() const { diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h index 525402f..ecaaf3a 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h @@ -191,10 +191,6 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // Only used by NativeWidgetAura. Specifies the type of layer for the // aura::Window. Default is LAYER_TEXTURED. ui::LayerType layer_type; - // Only used by Aura. Provides additional context (generally a RootWindow) - // during creation to allow the widget to determine which desktop type it - // will belong to. NULL indicates a normal native desktop. - gfx::NativeView context; }; Widget(); |