summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-12 22:56:25 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-12 22:56:25 +0000
commit04925978d28ec771c89fb9fab52b89e592d68f20 (patch)
tree5c287ae2a6243ea108f12aaeb1b675a17dd14183 /content
parentb400c9082d1efdd734a92d906f2a0c9d80f70aa8 (diff)
downloadchromium_src-04925978d28ec771c89fb9fab52b89e592d68f20.zip
chromium_src-04925978d28ec771c89fb9fab52b89e592d68f20.tar.gz
chromium_src-04925978d28ec771c89fb9fab52b89e592d68f20.tar.bz2
Revert 167245 - Currently, the ash and desktop implementations of StackingClient stomp each other in aura::Env. Instead:
- Don't have StackingClient implementations install themselves by default - Add chrome implementation of StackingClient that dispatches to ash or desktop - Pass extra |context| to GetDefaultParent (normally a RootWindow) that it can use to determine desktop type. - Workaround a few locations by using ScopedForceDesktopType: in these locations, the GetHostDesktopForNative... functions fail because they're used during window creation when the windows have no parent (and so can't determine which desktop they're in). - Remove window-specific StackingClient (unnecessary?) BUG=128578 Review URL: https://codereview.chromium.org/11364053 TBR=scottmg@google.com git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167253 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc6
-rw-r--r--content/shell/shell_aura.cc1
-rw-r--r--content/shell/shell_stacking_client_ash.cc2
-rw-r--r--content/shell/shell_stacking_client_ash.h3
4 files changed, 4 insertions, 8 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index a9dcef2..9ffe30b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -325,8 +325,7 @@ void RenderWidgetHostViewAura::InitAsPopup(
gfx::Point origin_in_screen(bounds_in_display.origin());
screen_position_client->ConvertPointToScreen(root, &origin_in_screen);
parent = aura::client::GetStackingClient()->GetDefaultParent(
- window_, window_,
- gfx::Rect(origin_in_screen, bounds_in_display.size()));
+ window_, gfx::Rect(origin_in_screen, bounds_in_display.size()));
}
window_->SetParent(parent);
SetBounds(bounds_in_display);
@@ -353,8 +352,7 @@ void RenderWidgetHostViewAura::InitAsFullscreen(
aura::client::StackingClient* stacking_client =
aura::client::GetStackingClient();
if (stacking_client)
- parent = stacking_client->GetDefaultParent(
- window_, window_, display.bounds());
+ parent = stacking_client->GetDefaultParent(window_, display.bounds());
}
window_->SetParent(parent);
Show();
diff --git a/content/shell/shell_aura.cc b/content/shell/shell_aura.cc
index 16157b5..fa58914 100644
--- a/content/shell/shell_aura.cc
+++ b/content/shell/shell_aura.cc
@@ -290,7 +290,6 @@ void Shell::PlatformInitialize() {
gfx::SCREEN_TYPE_NATIVE, new ash::ScreenAsh);
#else
stacking_client_ = new aura::DesktopStackingClient();
- aura::client::SetStackingClient(stacking_client_);
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, aura::CreateDesktopScreen());
#endif
diff --git a/content/shell/shell_stacking_client_ash.cc b/content/shell/shell_stacking_client_ash.cc
index 75a708b..cdc93a7 100644
--- a/content/shell/shell_stacking_client_ash.cc
+++ b/content/shell/shell_stacking_client_ash.cc
@@ -14,6 +14,7 @@
namespace content {
ShellStackingClientAsh::ShellStackingClientAsh() {
+ aura::client::SetStackingClient(this);
}
ShellStackingClientAsh::~ShellStackingClientAsh() {
@@ -24,7 +25,6 @@ ShellStackingClientAsh::~ShellStackingClientAsh() {
}
aura::Window* ShellStackingClientAsh::GetDefaultParent(
- aura::Window* context,
aura::Window* window,
const gfx::Rect& bounds) {
if (!root_window_.get()) {
diff --git a/content/shell/shell_stacking_client_ash.h b/content/shell/shell_stacking_client_ash.h
index 73e420d..d5adbc9 100644
--- a/content/shell/shell_stacking_client_ash.h
+++ b/content/shell/shell_stacking_client_ash.h
@@ -42,8 +42,7 @@ class ShellStackingClientAsh : public aura::client::StackingClient {
virtual ~ShellStackingClientAsh();
// 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;
private: