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

Unified Diff: ui/views/view.h

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index 9d43e2cea038fb87a009c9a7a41423c2650bd91f..8de66635891eb0dd8a999bdf70e67704d18a2541 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -513,8 +513,9 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
ui::ThemeProvider* GetThemeProvider() const;
// Returns the NativeTheme to use for this View. This calls through to
- // GetNativeTheme() on the Widget this View is in. If this View is not in a
- // Widget this returns ui::NativeTheme::instance().
+ // GetNativeTheme() on the Widget this View is in, or provides a default
+ // theme if there's no widget. Warning: the default theme might not be
+ // correct; you should probably override OnNativeThemeChanged().
ui::NativeTheme* GetNativeTheme() {
return const_cast<ui::NativeTheme*>(
const_cast<const View*>(this)->GetNativeTheme());

Powered by Google App Engine
This is Rietveld 408576698