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

Side by Side Diff: content/browser/theme_helper_mac.h

Issue 1642553004: Make a test not depend on system settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/theme_helper_mac.mm » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_THEME_HELPER_MAC_H_ 5 #ifndef CONTENT_BROWSER_THEME_HELPER_MAC_H_
6 #define CONTENT_BROWSER_THEME_HELPER_MAC_H_ 6 #define CONTENT_BROWSER_THEME_HELPER_MAC_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 11 #include "content/public/browser/notification_registrar.h"
12 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" 12 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class CONTENT_EXPORT ScopedPreferredScrollerStyleOveride {
tapted 2016/01/31 23:33:13 ObjectiveC gives us a cheaty way to do this kind o
17 public:
18 ScopedPreferredScrollerStyleOveride(blink::ScrollerStyle value);
tapted 2016/01/31 23:33:13 nit: explicit
19 ~ScopedPreferredScrollerStyleOveride();
20
21 blink::ScrollerStyle value() const { return value_; }
22
23 private:
24 blink::ScrollerStyle value_;
25 };
tapted 2016/01/31 23:33:13 nit: DISALLOW_COPY_AND_ASSIGN(..)
26
16 class ThemeHelperMac : public NotificationObserver { 27 class ThemeHelperMac : public NotificationObserver {
17 public: 28 public:
18 // Return pointer to the singleton instance for the current process, or NULL 29 // Return pointer to the singleton instance for the current process, or NULL
19 // if none. 30 // if none.
20 static ThemeHelperMac* GetInstance(); 31 static ThemeHelperMac* GetInstance();
21 32
22 // Returns the value of +[NSScroller preferredScrollStyle] as expressed 33 // Returns the value of +[NSScroller preferredScrollStyle] as expressed
23 // as the blink enum value. 34 // as the blink enum value.
24 static blink::ScrollerStyle GetPreferredScrollerStyle(); 35 static blink::ScrollerStyle GetPreferredScrollerStyle();
25 36
26 private: 37 private:
27 friend struct base::DefaultSingletonTraits<ThemeHelperMac>; 38 friend struct base::DefaultSingletonTraits<ThemeHelperMac>;
28 39
29 ThemeHelperMac(); 40 ThemeHelperMac();
30 ~ThemeHelperMac() override; 41 ~ThemeHelperMac() override;
31 42
32 // Overridden from NotificationObserver: 43 // Overridden from NotificationObserver:
33 void Observe(int type, 44 void Observe(int type,
34 const NotificationSource& source, 45 const NotificationSource& source,
35 const NotificationDetails& details) override; 46 const NotificationDetails& details) override;
36 47
37 NotificationRegistrar registrar_; 48 NotificationRegistrar registrar_;
38 49
39 DISALLOW_COPY_AND_ASSIGN(ThemeHelperMac); 50 DISALLOW_COPY_AND_ASSIGN(ThemeHelperMac);
40 }; 51 };
41 52
42 } // namespace content 53 } // namespace content
43 54
44 #endif // CONTENT_BROWSER_THEME_HELPER_MAC_H_ 55 #endif // CONTENT_BROWSER_THEME_HELPER_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/theme_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698