| 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 "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
| 11 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 13 #include "content/public/browser/notification_types.h" | 14 #include "content/public/browser/notification_types.h" |
| 14 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
| 15 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
| 16 | 17 |
| 17 // Declare notification names from the 10.7 SDK. | 18 // Declare notification names from the 10.7 SDK. |
| 18 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 19 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
| 19 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 20 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
| 21 |
| 20 NSString* NSPreferredScrollerStyleDidChangeNotification = | 22 NSString* NSPreferredScrollerStyleDidChangeNotification = |
| 21 @"NSPreferredScrollerStyleDidChangeNotification"; | 23 @"NSPreferredScrollerStyleDidChangeNotification"; |
| 22 | 24 |
| 23 @interface NSScroller (LionSDK) | |
| 24 + (NSInteger)preferredScrollerStyle; | |
| 25 @end | |
| 26 #endif | 25 #endif |
| 27 | 26 |
| 28 @interface ScrollbarPrefsObserver : NSObject | 27 @interface ScrollbarPrefsObserver : NSObject |
| 29 | 28 |
| 30 + (void)registerAsObserver; | 29 + (void)registerAsObserver; |
| 31 + (void)appearancePrefsChanged:(NSNotification*)notification; | 30 + (void)appearancePrefsChanged:(NSNotification*)notification; |
| 32 + (void)behaviorPrefsChanged:(NSNotification*)notification; | 31 + (void)behaviorPrefsChanged:(NSNotification*)notification; |
| 33 + (void)notifyPrefsChangedWithRedraw:(BOOL)redraw; | 32 + (void)notifyPrefsChangedWithRedraw:(BOOL)redraw; |
| 34 | 33 |
| 35 @end | 34 @end |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); | 141 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); |
| 143 rph->Send(new ViewMsg_UpdateScrollbarTheme( | 142 rph->Send(new ViewMsg_UpdateScrollbarTheme( |
| 144 [defaults floatForKey:@"NSScrollerButtonDelay"], | 143 [defaults floatForKey:@"NSScrollerButtonDelay"], |
| 145 [defaults floatForKey:@"NSScrollerButtonPeriod"], | 144 [defaults floatForKey:@"NSScrollerButtonPeriod"], |
| 146 [defaults boolForKey:@"AppleScrollerPagingBehavior"], | 145 [defaults boolForKey:@"AppleScrollerPagingBehavior"], |
| 147 GetPreferredScrollerStyle(), | 146 GetPreferredScrollerStyle(), |
| 148 false)); | 147 false)); |
| 149 } | 148 } |
| 150 | 149 |
| 151 } // namespace content | 150 } // namespace content |
| OLD | NEW |