diff options
author | glotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 18:22:12 +0000 |
---|---|---|
committer | glotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 18:22:12 +0000 |
commit | 7ceeba70872aab6ac66a1043c9f1587b12fc6710 (patch) | |
tree | b1b31bd92c42eee3987a970246107772d3eda4b7 /views/view.h | |
parent | a6bab42a4a8f87d60fd0b5772d4fb6e14381853a (diff) | |
download | chromium_src-7ceeba70872aab6ac66a1043c9f1587b12fc6710.zip chromium_src-7ceeba70872aab6ac66a1043c9f1587b12fc6710.tar.gz chromium_src-7ceeba70872aab6ac66a1043c9f1587b12fc6710.tar.bz2 |
UI Language switch implemented by propagating LocaleChanged()
notification to all the views currently active.
Before this CL, all views were recreated instead. That was very refactoring-unsafe.
Note, this is first part of the change. It prepares overall architecture means and can be committed first.
The other part contains implementation details and is here: http://codereview.chromium.org/1551029/show
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1596023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r-- | views/view.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/views/view.h b/views/view.h index d8177aa..bdf1b23 100644 --- a/views/view.h +++ b/views/view.h @@ -982,10 +982,8 @@ class View : public AcceleratorTarget { virtual void ThemeChanged(); // Called when the locale has changed, overriding allows individual Views to - // update locale-dependent resources (strings, bitmaps) it may have cached - // internally. Subclasses that override this method must call the base class - // implementation to ensure child views are processed. - virtual void LocaleChanged(); + // update locale-dependent strings. + virtual void LocaleChanged() { } #ifndef NDEBUG // Returns true if the View is currently processing a paint. @@ -1125,6 +1123,10 @@ class View : public AcceleratorTarget { gfx::Point start_pt; }; + // Propagates locale changed notification from the root view downside. + // Invokes LocaleChanged() for every view in the hierarchy. + virtual void NotifyLocaleChanged(); + // 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); |