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

Side by Side Diff: ui/aura/window.cc

Issue 2747723004: Revert of Correctly update the popup window position (patchset #6 id:160001 of https://codereview.c… (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 SetBoundsInternal(final_bounds); 299 SetBoundsInternal(final_bounds);
300 } 300 }
301 } 301 }
302 302
303 void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen, 303 void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen,
304 const display::Display& dst_display) { 304 const display::Display& dst_display) {
305 Window* root = GetRootWindow(); 305 Window* root = GetRootWindow();
306 if (root) { 306 if (root) {
307 aura::client::ScreenPositionClient* screen_position_client = 307 aura::client::ScreenPositionClient* screen_position_client =
308 aura::client::GetScreenPositionClient(root); 308 aura::client::GetScreenPositionClient(root);
309 if (screen_position_client) { 309 screen_position_client->SetBounds(this, new_bounds_in_screen, dst_display);
310 screen_position_client->SetBounds(this, new_bounds_in_screen, 310 return;
311 dst_display);
312 return;
313 }
314 } 311 }
315 SetBounds(new_bounds_in_screen); 312 SetBounds(new_bounds_in_screen);
316 } 313 }
317 314
318 gfx::Rect Window::GetTargetBounds() const { 315 gfx::Rect Window::GetTargetBounds() const {
319 return layer() ? layer()->GetTargetBounds() : bounds(); 316 return layer() ? layer()->GetTargetBounds() : bounds();
320 } 317 }
321 318
322 void Window::SchedulePaintInRect(const gfx::Rect& rect) { 319 void Window::SchedulePaintInRect(const gfx::Rect& rect) {
323 layer()->SchedulePaint(rect); 320 layer()->SchedulePaint(rect);
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 layer_name = "Unnamed Window"; 1082 layer_name = "Unnamed Window";
1086 1083
1087 if (id_ != -1) 1084 if (id_ != -1)
1088 layer_name += " " + base::IntToString(id_); 1085 layer_name += " " + base::IntToString(id_);
1089 1086
1090 layer()->set_name(layer_name); 1087 layer()->set_name(layer_name);
1091 #endif 1088 #endif
1092 } 1089 }
1093 1090
1094 } // namespace aura 1091 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698