OLD | NEW |
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 #include "content/browser/theme_helper_mac.h" | 5 #include "content/browser/theme_helper_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 ThemeHelperMac::~ThemeHelperMac() { | 130 ThemeHelperMac::~ThemeHelperMac() { |
131 } | 131 } |
132 | 132 |
133 void ThemeHelperMac::Observe(int type, | 133 void ThemeHelperMac::Observe(int type, |
134 const NotificationSource& source, | 134 const NotificationSource& source, |
135 const NotificationDetails& details) { | 135 const NotificationDetails& details) { |
136 DCHECK_EQ(NOTIFICATION_RENDERER_PROCESS_CREATED, type); | 136 DCHECK_EQ(NOTIFICATION_RENDERER_PROCESS_CREATED, type); |
137 | 137 |
138 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 138 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
139 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | 139 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
140 [defaults synchronize]; | 140 [defaults synchronize]; |
141 | 141 |
142 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); | 142 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); |
143 rph->Send(new ViewMsg_UpdateScrollbarTheme( | 143 rph->Send(new ViewMsg_UpdateScrollbarTheme( |
144 [defaults floatForKey:@"NSScrollerButtonDelay"], | 144 [defaults floatForKey:@"NSScrollerButtonDelay"], |
145 [defaults floatForKey:@"NSScrollerButtonPeriod"], | 145 [defaults floatForKey:@"NSScrollerButtonPeriod"], |
146 [defaults boolForKey:@"AppleScrollerPagingBehavior"], | 146 [defaults boolForKey:@"AppleScrollerPagingBehavior"], |
147 GetPreferredScrollerStyle(), | 147 GetPreferredScrollerStyle(), |
148 false)); | 148 false)); |
149 } | 149 } |
150 | 150 |
151 } // namespace content | 151 } // namespace content |
OLD | NEW |