summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-27 16:59:48 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-27 16:59:48 +0000
commit8bc740650b662c9aea5c53caba97229aec18dfd4 (patch)
treedd3bdb26ffd46ada067c0337afe46b6e99c5767e /ui/views
parent79fb729c6794571b20577e31bf3e809ab0eeafba (diff)
downloadchromium_src-8bc740650b662c9aea5c53caba97229aec18dfd4.zip
chromium_src-8bc740650b662c9aea5c53caba97229aec18dfd4.tar.gz
chromium_src-8bc740650b662c9aea5c53caba97229aec18dfd4.tar.bz2
Move locale changing out of Widget in Aura.
It's only used by the login language switch menu. It can be done better in the language switch menu code and allows us to remove a Rootwindow::GetInstance() use. http://crbug.com/112131 TEST=none Review URL: https://chromiumcodereview.appspot.com/9464050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/widget/native_widget_aura.cc32
-rw-r--r--ui/views/widget/widget.h1
2 files changed, 3 insertions, 30 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index e1e9d8e..23571fa 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -62,34 +62,6 @@ aura::client::WindowType GetAuraWindowTypeForWidgetType(
}
}
-typedef void (*WidgetCallback)(Widget*);
-
-void ForEachNativeWidgetInternal(aura::Window* window,
- WidgetCallback callback) {
- Widget* widget = Widget::GetWidgetForNativeWindow(window);
- if (widget)
- callback(widget);
-
- const aura::Window::Windows& children = window->children();
- for (aura::Window::Windows::const_iterator it = children.begin();
- it != children.end(); ++it) {
- ForEachNativeWidgetInternal(*it, callback);
- }
-}
-
-void ForEachNativeWidget(WidgetCallback callback) {
- ForEachNativeWidgetInternal(aura::RootWindow::GetInstance(), callback);
-}
-
-void NotifyLocaleChangedCallback(Widget* widget) {
- widget->LocaleChanged();
-}
-
-void CloseAllSecondaryWidgetsCallback(Widget* widget) {
- if (widget->is_secondary_widget())
- widget->Close();
-}
-
const gfx::Rect* GetRestoreBounds(aura::Window* window) {
return window->GetProperty(aura::client::kRestoreBoundsKey);
}
@@ -848,12 +820,12 @@ int NativeWidgetAura::OnPerformDrop(const aura::DropTargetEvent& event) {
// static
void Widget::NotifyLocaleChanged() {
- ForEachNativeWidget(NotifyLocaleChangedCallback);
+ // Deliberately not implemented.
}
// static
void Widget::CloseAllSecondaryWidgets() {
- ForEachNativeWidget(CloseAllSecondaryWidgetsCallback);
+ // Deliberately not implemented.
}
bool Widget::ConvertRect(const Widget* source,
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index b9e0008..265ae36 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -200,6 +200,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Enumerates all windows pertaining to us and notifies their
// view hierarchies that the locale has changed.
+ // TODO(beng): remove post-Aurafication of ChromeOS.
static void NotifyLocaleChanged();
// Closes all Widgets that aren't identified as "secondary widgets". Called