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

Side by Side Diff: views/view.cc

Issue 2878055: Make theme change notifications auto-propagate through the view hierarchy, in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « views/view.h ('k') | views/widget/root_view.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #ifndef NDEBUG 8 #ifndef NDEBUG
9 #include <iostream> 9 #include <iostream>
10 #endif 10 #endif
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 void View::PropagateAddNotifications(View* parent, View* child) { 660 void View::PropagateAddNotifications(View* parent, View* child) {
661 for (int i = 0, count = GetChildViewCount(); i < count; ++i) 661 for (int i = 0, count = GetChildViewCount(); i < count; ++i)
662 GetChildViewAt(i)->PropagateAddNotifications(parent, child); 662 GetChildViewAt(i)->PropagateAddNotifications(parent, child);
663 ViewHierarchyChangedImpl(true, true, parent, child); 663 ViewHierarchyChangedImpl(true, true, parent, child);
664 } 664 }
665 665
666 bool View::IsFocusable() const { 666 bool View::IsFocusable() const {
667 return focusable_ && IsEnabled() && IsVisible(); 667 return focusable_ && IsEnabled() && IsVisible();
668 } 668 }
669 669
670 void View::ThemeChanged() { 670 void View::PropagateThemeChanged() {
671 for (int i = GetChildViewCount() - 1; i >= 0; --i) 671 for (int i = GetChildViewCount() - 1; i >= 0; --i)
672 GetChildViewAt(i)->ThemeChanged(); 672 GetChildViewAt(i)->PropagateThemeChanged();
673 OnThemeChanged();
673 } 674 }
674 675
675 void View::NotifyLocaleChanged() { 676 void View::PropagateLocaleChanged() {
676 LocaleChanged();
677 for (int i = GetChildViewCount() - 1; i >= 0; --i) 677 for (int i = GetChildViewCount() - 1; i >= 0; --i)
678 GetChildViewAt(i)->NotifyLocaleChanged(); 678 GetChildViewAt(i)->PropagateLocaleChanged();
679 OnLocaleChanged();
679 } 680 }
680 681
681 #ifndef NDEBUG 682 #ifndef NDEBUG
682 bool View::IsProcessingPaint() const { 683 bool View::IsProcessingPaint() const {
683 return GetParent() && GetParent()->IsProcessingPaint(); 684 return GetParent() && GetParent()->IsProcessingPaint();
684 } 685 }
685 #endif 686 #endif
686 687
687 gfx::Point View::GetKeyboardContextMenuLocation() { 688 gfx::Point View::GetKeyboardContextMenuLocation() {
688 gfx::Rect vis_bounds = GetVisibleBounds(); 689 gfx::Rect vis_bounds = GetVisibleBounds();
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 possible_drag = false; 1513 possible_drag = false;
1513 start_pt = gfx::Point(); 1514 start_pt = gfx::Point();
1514 } 1515 }
1515 1516
1516 void View::DragInfo::PossibleDrag(const gfx::Point& p) { 1517 void View::DragInfo::PossibleDrag(const gfx::Point& p) {
1517 possible_drag = true; 1518 possible_drag = true;
1518 start_pt = p; 1519 start_pt = p;
1519 } 1520 }
1520 1521
1521 } // namespace 1522 } // namespace
OLDNEW
« no previous file with comments | « views/view.h ('k') | views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698