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

Unified Diff: content/browser/theme_helper_mac.mm

Issue 145013018: Move preferred scrollbar style preference change listening from renderer to browser, 4 of 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/theme_helper_mac.mm
diff --git a/content/browser/theme_helper_mac.mm b/content/browser/theme_helper_mac.mm
index 21c476f0573777bbe78636c52a8d33cf94e5aa56..34e90820c2e10557bdf91f9c74335c967cf5d06e 100644
--- a/content/browser/theme_helper_mac.mm
+++ b/content/browser/theme_helper_mac.mm
@@ -6,11 +6,13 @@
#import <Cocoa/Cocoa.h>
+#include "base/command_line.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/common/content_switches.h"
// Declare notification names from the 10.7 SDK.
#if !defined(MAC_OS_X_VERSION_10_7) || \
@@ -49,7 +51,10 @@ suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately];
object:nil
suspensionBehavior:NSNotificationSuspensionBehaviorCoalesce];
- if ([NSScroller respondsToSelector:@selector(preferredScrollerStyle)]) {
+ // In single-process mode, renderers will catch these notifications
+ // themselves and listening for them here may trigger the DCHECK in Observe().
+ if ([NSScroller respondsToSelector:@selector(preferredScrollerStyle)] &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) {
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(behaviorPrefsChanged:)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698