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

Unified Diff: ui/views/widget/widget.h

Issue 239093007: Update Windows UI on system color changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make Widget the observer, address additional comments. Created 6 years, 8 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
Index: ui/views/widget/widget.h
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 192901995a000a21b5cc52cd314bdbb97b5b9782..1ec3160a0d985948ad2c78ff23e910c9741d7db2 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -12,11 +12,13 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
+#include "base/scoped_observer.h"
#include "ui/aura/window_layer_type.h"
#include "ui/base/ui_base_types.h"
#include "ui/events/event_source.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/native_widget_delegate.h"
#include "ui/views/window/client_view.h"
@@ -46,7 +48,6 @@ class Accelerator;
class Compositor;
class DefaultThemeProvider;
class Layer;
-class NativeTheme;
class OSExchangeData;
class ThemeProvider;
}
@@ -95,7 +96,8 @@ class RootView;
//
class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
public ui::EventSource,
- public FocusTraversable {
+ public FocusTraversable,
+ public ui::NativeThemeObserver {
public:
typedef std::set<Widget*> Widgets;
@@ -761,6 +763,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
virtual View* GetFocusTraversableParentView() OVERRIDE;
+ // Overridden from ui::NativeThemeObserver:
+ virtual void OnNativeThemeUpdate() OVERRIDE;
+
protected:
// Creates the RootView to be used within this Widget. Subclasses may override
// to create custom RootViews that do specialized event processing.
@@ -906,6 +911,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// disabled.
bool movement_disabled_;
+ ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
+
DISALLOW_COPY_AND_ASSIGN(Widget);
};

Powered by Google App Engine
This is Rietveld 408576698