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

Unified Diff: ui/native_theme/native_theme.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: NATIVE_THEME_EXPORT for mac 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
« no previous file with comments | « content/child/webthemeengine_impl_default.cc ('k') | ui/native_theme/native_theme.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme.h
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 714b4b09fba14a0dde29ad50a15a082283a5dbf4..15bc92197e7af97c1969a31e9a54259a5cf27c94 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -344,12 +344,13 @@ class NATIVE_THEME_EXPORT NativeTheme {
// Return a color from the system theme.
virtual SkColor GetSystemColor(ColorId color_id) const = 0;
- // Returns a shared instance of the native theme.
- // The returned object should not be deleted by the caller. This function
- // is not thread safe and should only be called from the UI thread.
- // Each port of NativeTheme should provide its own implementation of this
- // function, returning the port's subclass.
- static NativeTheme* instance();
+ // Returns a shared instance of the native theme that should be used for web
+ // rendering. Do not use it in a normal application context (i.e. browser).
+ // The returned object should not be deleted by the caller. This function is
+ // not thread safe and should only be called from the UI thread. Each port of
+ // NativeTheme should provide its own implementation of this function,
+ // returning the port's subclass.
+ static NativeTheme* GetInstanceForWeb();
// Add or remove observers to be notified when the native theme changes.
void AddObserver(NativeThemeObserver* observer);
« no previous file with comments | « content/child/webthemeengine_impl_default.cc ('k') | ui/native_theme/native_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698