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

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

Issue 11819012: aura: Don't notify observers in Window::SetExternalTexture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 void Window::SchedulePaintInRect(const gfx::Rect& rect) { 310 void Window::SchedulePaintInRect(const gfx::Rect& rect) {
311 if (layer_->SchedulePaint(rect)) { 311 if (layer_->SchedulePaint(rect)) {
312 FOR_EACH_OBSERVER( 312 FOR_EACH_OBSERVER(
313 WindowObserver, observers_, OnWindowPaintScheduled(this, rect)); 313 WindowObserver, observers_, OnWindowPaintScheduled(this, rect));
314 } 314 }
315 } 315 }
316 316
317 void Window::SetExternalTexture(ui::Texture* texture) { 317 void Window::SetExternalTexture(ui::Texture* texture) {
318 layer_->SetExternalTexture(texture); 318 layer_->SetExternalTexture(texture);
319 gfx::Rect region(bounds().size());
320 FOR_EACH_OBSERVER(
321 WindowObserver, observers_, OnWindowPaintScheduled(this, region));
322 } 319 }
323 320
324 void Window::SetDefaultParentByRootWindow(RootWindow* root_window, 321 void Window::SetDefaultParentByRootWindow(RootWindow* root_window,
325 const gfx::Rect& bounds_in_screen) { 322 const gfx::Rect& bounds_in_screen) {
326 // TODO(erg): Enable this DCHECK once it is safe. 323 // TODO(erg): Enable this DCHECK once it is safe.
327 // DCHECK(root_window); 324 // DCHECK(root_window);
328 325
329 // Stacking clients are mandatory on RootWindow objects. 326 // Stacking clients are mandatory on RootWindow objects.
330 client::StackingClient* client = client::GetStackingClient(root_window); 327 client::StackingClient* client = client::GetStackingClient(root_window);
331 DCHECK(client); 328 DCHECK(client);
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 bool contains_mouse = false; 966 bool contains_mouse = false;
970 if (IsVisible()) { 967 if (IsVisible()) {
971 RootWindow* root_window = GetRootWindow(); 968 RootWindow* root_window = GetRootWindow();
972 contains_mouse = root_window && 969 contains_mouse = root_window &&
973 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); 970 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot());
974 } 971 }
975 return contains_mouse; 972 return contains_mouse;
976 } 973 }
977 974
978 } // namespace aura 975 } // namespace aura
OLDNEW
« 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