Index: chrome/browser/themes/theme_service_win.h |
diff --git a/chrome/browser/themes/theme_service_win.h b/chrome/browser/themes/theme_service_win.h |
index 770bea523d2ae266e5c64cc4d78f344c03eceba5..9f8feb995ee2bddaa605eb4591d4e018864a841c 100644 |
--- a/chrome/browser/themes/theme_service_win.h |
+++ b/chrome/browser/themes/theme_service_win.h |
@@ -8,6 +8,9 @@ |
#include "base/win/registry.h" |
#include "chrome/browser/themes/theme_service.h" |
+// Tracks updates to the native colors on Windows 10 and calcuates the values we |
+// should use (which are not always what Windows uses). None of the values here |
+// are relevant to earlier versions of Windows. |
Peter Kasting
2016/12/01 06:19:04
Should this be renamed ThemeServiceWin10 then?
No
Bret
2016/12/08 00:16:07
I think the name is okay, since it's an OS-specifi
Peter Kasting
2016/12/08 00:24:50
Fixing Win 7 basic seems worth doing; that's used
|
class ThemeServiceWin : public ThemeService { |
public: |
ThemeServiceWin(); |
@@ -18,21 +21,27 @@ class ThemeServiceWin : public ThemeService { |
bool ShouldUseNativeFrame() const override; |
SkColor GetDefaultColor(int id, bool incognito) const override; |
- // Returns true if the window frame color is determined by the DWM, i.e. this |
- // is a native frame on Windows 10. |
- bool ShouldUseDwmFrameColor() const; |
+ // Returns true if colors from DWM can be used, i.e. this is a native frame |
+ // on Windows 10. |
+ bool DwmColorsAllowed() const; |
// Callback executed when |dwm_key_| is updated. This re-reads the active |
// frame color and updates |dwm_frame_color_|. |
void OnDwmKeyUpdated(); |
// Registry key containing the params that determine the DWM frame color. |
- // This is only initialized on Windows 10. |
std::unique_ptr<base::win::RegKey> dwm_key_; |
- // The DWM frame color, if available; white otherwise. |
+ // True if the frame should be colored using the DWM values here. False if the |
+ // default frame colors should be used instead. |
+ bool use_dwm_frame_color_; |
Peter Kasting
2016/12/01 06:19:04
Maybe instead of this bool, use a base::Optional<S
Bret
2016/12/08 00:16:07
I don't quite understand what you mean here. Do yo
Peter Kasting
2016/12/08 00:24:50
My intent was that this class is only used to repo
Bret
2016/12/08 02:16:59
Oh okay I see what you mean now. I don't think the
Peter Kasting
2016/12/08 04:59:47
Hmm. I know we'd probably have to write some simi
|
+ |
+ // The frame color when active. |
SkColor dwm_frame_color_; |
+ // The frame color when inactive. |
+ SkColor dwm_inactive_frame_color_; |
+ |
// The DWM accent border color, if available; white otherwise. |
SkColor dwm_accent_border_color_; |