Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
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 66fd5f36124ad5f47fc8cea2eb8ed7656446ea0a..4d36c988e90d652d4bc288da8377ea9c178e1d62 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -323,16 +323,17 @@ void RenderWidgetHostViewAura::InitAsPopup( |
window_->SetName("RenderWidgetHostViewAura"); |
aura::RootWindow* root = popup_parent_host_view_->window_->GetRootWindow(); |
- aura::Window* parent = aura::client::GetStackingClient()->GetDefaultParent( |
- window_, window_, bounds_in_screen); |
- window_->SetParent(parent); |
+ window_->SetDefaultParentByRootWindow(root, bounds_in_screen); |
+ // TODO(erg): While I could make sure details of the StackingClient are |
+ // hidden behind aura, hiding the details of the ScreenPositionClient will |
+ // take another effort. |
+ gfx::Point origin_in_screen(bounds_in_screen.origin()); |
aura::client::ScreenPositionClient* screen_position_client = |
aura::client::GetScreenPositionClient(root); |
- gfx::Point origin_in_parent(bounds_in_screen.origin()); |
if (screen_position_client) |
- screen_position_client->ConvertPointFromScreen(parent, &origin_in_parent); |
- SetBounds(gfx::Rect(origin_in_parent, bounds_in_screen.size())); |
+ screen_position_client->ConvertPointToScreen(root, &origin_in_screen); |
+ SetBounds(gfx::Rect(origin_in_screen, bounds_in_screen.size())); |
oshima
2012/11/27 00:14:30
This will break chromeos/win_ash. The bounds_in_sc
Elliot Glaysher
2012/11/27 00:33:51
I changed this to be what it used to be, and grabb
|
Show(); |
} |
@@ -343,7 +344,9 @@ void RenderWidgetHostViewAura::InitAsFullscreen( |
window_->Init(ui::LAYER_TEXTURED); |
window_->SetName("RenderWidgetHostViewAura"); |
window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); |
- aura::Window* parent = NULL; |
+ |
+ aura::RootWindow* parent = NULL; |
+ gfx::Rect bounds; |
if (reference_host_view) { |
aura::Window* reference_window = |
static_cast<RenderWidgetHostViewAura*>(reference_host_view)->window_; |
@@ -353,13 +356,11 @@ void RenderWidgetHostViewAura::InitAsFullscreen( |
} |
gfx::Display display = gfx::Screen::GetScreenFor(window_)-> |
GetDisplayNearestWindow(reference_window); |
- aura::client::StackingClient* stacking_client = |
- aura::client::GetStackingClient(); |
- if (stacking_client) |
- parent = stacking_client->GetDefaultParent( |
- window_, window_, display.bounds()); |
+ parent = reference_window->GetRootWindow(); |
+ bounds = display.bounds(); |
} |
- window_->SetParent(parent); |
+ window_->SetDefaultParentByRootWindow(parent, bounds); |
+ |
Show(); |
Focus(); |
} |