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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_position_client.cc

Issue 292583003: Remove unused code in DesktopScreenPositionClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_screen_position_client.cc
diff --git a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
index 34c8553e2512a7676f017d7d64bffb0becc87ab5..1f455ecc74db5535b66f956ebed787d6480cc70f 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
@@ -75,6 +75,13 @@ void DesktopScreenPositionClient::SetBounds(
// TODO: Use the 3rd parameter, |display|.
aura::Window* root = window->GetRootWindow();
+ // This method assumes that |window| does not have an associated
+ // DesktopNativeWidgetAura.
+ internal::NativeWidgetPrivate* desktop_native_widget =
+ DesktopNativeWidgetAura::ForWindow(root);
+ DCHECK(!desktop_native_widget ||
+ desktop_native_widget->GetNativeView() != window);
+
if (PositionWindowInScreenCoordinates(window)) {
// The caller expects windows we consider "embedded" to be placed in the
// screen coordinate system. So we need to offset the root window's
@@ -89,16 +96,7 @@ void DesktopScreenPositionClient::SetBounds(
return;
}
- internal::NativeWidgetPrivate* desktop_native_widget =
- DesktopNativeWidgetAura::ForWindow(root);
- if (desktop_native_widget &&
- desktop_native_widget->GetNativeView() == window) {
- // |window| is the content_window.
- // Setting bounds of root resizes |window|.
- root->GetHost()->SetBounds(bounds);
- } else {
- window->SetBounds(bounds);
- }
+ window->SetBounds(bounds);
}
} // namespace views
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698