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

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

Issue 8621003: aura: Rename OnPropertyChanged to OnWindowPropertyChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | ui/aura/window_observer.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 Desktop* desktop = GetDesktop(); 403 Desktop* desktop = GetDesktop();
404 return desktop && desktop->capture_window() == this; 404 return desktop && desktop->capture_window() == this;
405 } 405 }
406 406
407 void Window::SetProperty(const char* name, void* value) { 407 void Window::SetProperty(const char* name, void* value) {
408 void* old = GetProperty(name); 408 void* old = GetProperty(name);
409 if (value) 409 if (value)
410 prop_map_[name] = value; 410 prop_map_[name] = value;
411 else 411 else
412 prop_map_.erase(name); 412 prop_map_.erase(name);
413 FOR_EACH_OBSERVER(WindowObserver, observers_, 413 FOR_EACH_OBSERVER(
414 OnPropertyChanged(this, name, old)); 414 WindowObserver, observers_, OnWindowPropertyChanged(this, name, old));
415 } 415 }
416 416
417 void Window::SetIntProperty(const char* name, int value) { 417 void Window::SetIntProperty(const char* name, int value) {
418 SetProperty(name, reinterpret_cast<void*>(value)); 418 SetProperty(name, reinterpret_cast<void*>(value));
419 } 419 }
420 420
421 void* Window::GetProperty(const char* name) const { 421 void* Window::GetProperty(const char* name) const {
422 std::map<const char*, void*>::const_iterator iter = prop_map_.find(name); 422 std::map<const char*, void*>::const_iterator iter = prop_map_.find(name);
423 if (iter == prop_map_.end()) 423 if (iter == prop_map_.end())
424 return NULL; 424 return NULL;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 void Window::OnStackingChanged() { 533 void Window::OnStackingChanged() {
534 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowStackingChanged(this)); 534 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowStackingChanged(this));
535 } 535 }
536 536
537 void Window::OnPaintLayer(gfx::Canvas* canvas) { 537 void Window::OnPaintLayer(gfx::Canvas* canvas) {
538 if (delegate_) 538 if (delegate_)
539 delegate_->OnPaint(canvas); 539 delegate_->OnPaint(canvas);
540 } 540 }
541 541
542 } // namespace aura 542 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698