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

Side by Side Diff: ui/native_theme/native_theme.h

Issue 2480063002: Split NativeThemeAura into Overlay and NonOverlay versions. (Closed)
Patch Set: Fix Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/native_theme/BUILD.gn ('k') | ui/native_theme/native_theme_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 // Return a color from the system theme. 355 // Return a color from the system theme.
356 virtual SkColor GetSystemColor(ColorId color_id) const = 0; 356 virtual SkColor GetSystemColor(ColorId color_id) const = 0;
357 357
358 // Returns a shared instance of the native theme that should be used for web 358 // Returns a shared instance of the native theme that should be used for web
359 // rendering. Do not use it in a normal application context (i.e. browser). 359 // rendering. Do not use it in a normal application context (i.e. browser).
360 // The returned object should not be deleted by the caller. This function is 360 // The returned object should not be deleted by the caller. This function is
361 // not thread safe and should only be called from the UI thread. Each port of 361 // not thread safe and should only be called from the UI thread. Each port of
362 // NativeTheme should provide its own implementation of this function, 362 // NativeTheme should provide its own implementation of this function,
363 // returning the port's subclass. 363 // returning the port's subclass.
364 static NativeTheme* GetInstanceForWeb(); 364 static NativeTheme* GetInstanceForWeb(bool use_overlay_scrollbars);
365 365
366 // Add or remove observers to be notified when the native theme changes. 366 // Add or remove observers to be notified when the native theme changes.
367 void AddObserver(NativeThemeObserver* observer); 367 void AddObserver(NativeThemeObserver* observer);
368 void RemoveObserver(NativeThemeObserver* observer); 368 void RemoveObserver(NativeThemeObserver* observer);
369 369
370 // Notify observers of native theme changes. 370 // Notify observers of native theme changes.
371 void NotifyObservers(); 371 void NotifyObservers();
372 372
373 protected: 373 protected:
374 NativeTheme(); 374 NativeTheme();
375 virtual ~NativeTheme(); 375 virtual ~NativeTheme();
376 376
377 unsigned int thumb_inactive_color_; 377 unsigned int thumb_inactive_color_;
378 unsigned int thumb_active_color_; 378 unsigned int thumb_active_color_;
379 unsigned int track_color_; 379 unsigned int track_color_;
380 380
381 private: 381 private:
382 // Observers to notify when the native theme changes. 382 // Observers to notify when the native theme changes.
383 base::ObserverList<NativeThemeObserver> native_theme_observers_; 383 base::ObserverList<NativeThemeObserver> native_theme_observers_;
384 384
385 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 385 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
386 }; 386 };
387 387
388 } // namespace ui 388 } // namespace ui
389 389
390 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 390 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW
« no previous file with comments | « ui/native_theme/BUILD.gn ('k') | ui/native_theme/native_theme_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698