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

Unified Diff: ui/aura/root_window.cc

Issue 128753002: Remove SetHostSize/Bounds from RootWindow in favor of just calling SetBounds() on host() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: weirdness Created 6 years, 11 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/aura/root_window.h ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 01f62c704cf36a9ef2dad63ddffb65fd21fa39ed..7e95d7538694c41862d55c648fdae07209138cf7 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -194,33 +194,6 @@ WindowTreeHostDelegate* RootWindow::AsWindowTreeHostDelegate() {
return this;
}
-void RootWindow::SetHostSize(const gfx::Size& size_in_pixel) {
- DispatchDetails details = DispatchHeldEvents();
- if (details.dispatcher_destroyed)
- return;
- gfx::Rect bounds = host_->GetBounds();
- bounds.set_size(size_in_pixel);
- host_->SetBounds(bounds);
-
- // Requery the location to constrain it within the new root window size.
- gfx::Point point;
- if (host_->QueryMouseLocation(&point)) {
- SetLastMouseLocation(window(),
- ui::ConvertPointToDIP(window()->layer(), point));
- }
-
- synthesize_mouse_move_ = false;
-}
-
-void RootWindow::SetHostBounds(const gfx::Rect& bounds_in_pixel) {
- DCHECK(!bounds_in_pixel.IsEmpty());
- DispatchDetails details = DispatchHeldEvents();
- if (details.dispatcher_destroyed)
- return;
- host_->SetBounds(bounds_in_pixel);
- synthesize_mouse_move_ = false;
-}
-
void RootWindow::SetCursor(gfx::NativeCursor cursor) {
last_cursor_ = cursor;
// A lot of code seems to depend on NULL cursors actually showing an arrow,
@@ -740,6 +713,14 @@ void RootWindow::OnHostResized(const gfx::Size& size) {
return;
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
OnWindowTreeHostResized(this));
+
+ // Constrain the mouse position within the new root Window size.
+ gfx::Point point;
+ if (host_->QueryMouseLocation(&point)) {
+ SetLastMouseLocation(window(),
+ ui::ConvertPointToDIP(window()->layer(), point));
+ }
+ synthesize_mouse_move_ = false;
}
RootWindow* RootWindow::AsRootWindow() {
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698