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

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

Issue 1081413004: [content] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/indexed_db/indexed_db_backing_store.cc ('k') | no next file » | 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 #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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 + (void)appearancePrefsChanged:(NSNotification*)notification { 66 + (void)appearancePrefsChanged:(NSNotification*)notification {
67 [self notifyPrefsChangedWithRedraw:YES]; 67 [self notifyPrefsChangedWithRedraw:YES];
68 } 68 }
69 69
70 + (void)behaviorPrefsChanged:(NSNotification*)notification { 70 + (void)behaviorPrefsChanged:(NSNotification*)notification {
71 [self notifyPrefsChangedWithRedraw:NO]; 71 [self notifyPrefsChangedWithRedraw:NO];
72 } 72 }
73 73
74 + (void)notifyPrefsChangedWithRedraw:(BOOL)redraw { 74 + (void)notifyPrefsChangedWithRedraw:(BOOL)redraw {
75 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 75 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
76 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 76 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
77 [defaults synchronize]; 77 [defaults synchronize];
78 78
79 content::ThemeHelperMac::SendThemeChangeToAllRenderers( 79 content::ThemeHelperMac::SendThemeChangeToAllRenderers(
80 [defaults floatForKey:@"NSScrollerButtonDelay"], 80 [defaults floatForKey:@"NSScrollerButtonDelay"],
81 [defaults floatForKey:@"NSScrollerButtonPeriod"], 81 [defaults floatForKey:@"NSScrollerButtonPeriod"],
82 [defaults boolForKey:@"AppleScrollerPagingBehavior"], 82 [defaults boolForKey:@"AppleScrollerPagingBehavior"],
83 content::ThemeHelperMac::GetPreferredScrollerStyle(), 83 content::ThemeHelperMac::GetPreferredScrollerStyle(),
84 redraw); 84 redraw);
85 } 85 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698