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

Unified Diff: views/view.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.h
===================================================================
--- views/view.h (revision 53545)
+++ views/view.h (working copy)
@@ -975,15 +975,15 @@
// Called when the UI theme has changed, overriding allows individual Views to
// do special cleanup and processing (such as dropping resource caches).
- // Subclasses that override this method must call the base class
- // implementation to ensure child views are processed.
- // Can only be called by subclasses. To dispatch a theme changed notification,
- // call this method on the RootView.
- virtual void ThemeChanged();
+ // To dispatch a theme changed notification, call
+ // RootView::NotifyThemeChanged().
+ virtual void OnThemeChanged() { }
// Called when the locale has changed, overriding allows individual Views to
// update locale-dependent strings.
- virtual void LocaleChanged() { }
+ // To dispatch a locale changed notification, call
+ // RootView::NotifyLocaleChanged().
+ virtual void OnLocaleChanged() { }
#ifndef NDEBUG
// Returns true if the View is currently processing a paint.
@@ -1137,10 +1137,14 @@
gfx::Point start_pt;
};
- // Propagates locale changed notification from the root view downside.
- // Invokes LocaleChanged() for every view in the hierarchy.
- virtual void NotifyLocaleChanged();
+ // Used to propagate theme changed notifications from the root view to all
+ // views in the hierarchy.
+ virtual void PropagateThemeChanged();
+ // Used to propagate locale changed notifications from the root view to all
+ // views in the hierarchy.
+ virtual void PropagateLocaleChanged();
+
// RootView invokes these. These in turn invoke the appropriate OnMouseXXX
// method. If a drag is detected, DoDrag is invoked.
bool ProcessMousePressed(const MouseEvent& e, DragInfo* drop_info);
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698