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

Unified Diff: ui/views/widget/desktop_native_widget_helper_aura.cc

Issue 10210005: Ash/aura split: NativeWidgetAura::GetWindowScreenBounds() should return screen bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky+oshima stuff Created 8 years, 8 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
« no previous file with comments | « ui/views/widget/desktop_native_widget_helper_aura.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_native_widget_helper_aura.cc
diff --git a/ui/views/widget/desktop_native_widget_helper_aura.cc b/ui/views/widget/desktop_native_widget_helper_aura.cc
index d05c0620cf3ebc29ae54a1ff32233675fca2de73..26af57e473a2460532d184dda5261466b4761240 100644
--- a/ui/views/widget/desktop_native_widget_helper_aura.cc
+++ b/ui/views/widget/desktop_native_widget_helper_aura.cc
@@ -49,14 +49,24 @@ aura::RootWindow* DesktopNativeWidgetHelperAura::GetRootWindow() {
return root_window_.get();
}
-gfx::Rect DesktopNativeWidgetHelperAura::ModifyAndSetBounds(gfx::Rect bounds) {
- if (root_window_.get() && !bounds.IsEmpty()) {
- root_window_->SetHostBounds(bounds);
- bounds.set_x(0);
- bounds.set_y(0);
+gfx::Rect DesktopNativeWidgetHelperAura::ModifyAndSetBounds(
+ const gfx::Rect& bounds) {
+ gfx::Rect out_bounds = bounds;
+ if (root_window_.get() && !out_bounds.IsEmpty()) {
+ root_window_->SetHostBounds(out_bounds);
+ out_bounds.set_x(0);
+ out_bounds.set_y(0);
}
- return bounds;
+ return out_bounds;
+}
+
+gfx::Rect DesktopNativeWidgetHelperAura::ChangeRootWindowBoundsToScreenBounds(
+ const gfx::Rect& bounds) {
+ gfx::Rect out_bounds = bounds;
+ if (root_window_.get())
+ out_bounds.Offset(root_window_->GetHostOrigin());
+ return out_bounds;
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/views/widget/desktop_native_widget_helper_aura.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698