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

Unified Diff: chrome/browser/ui/cocoa/info_bubble_window.mm

Issue 10808046: Disable blurring for extension bubbles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 5 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 | « chrome/browser/ui/cocoa/info_bubble_window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/info_bubble_window.mm
diff --git a/chrome/browser/ui/cocoa/info_bubble_window.mm b/chrome/browser/ui/cocoa/info_bubble_window.mm
index b04c1914a86812a80b1f2edfe2d6ecc53b84eba6..8b6d767aaa4f5b1f541a6b287525211d5f0272cb 100644
--- a/chrome/browser/ui/cocoa/info_bubble_window.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_window.mm
@@ -115,6 +115,7 @@ class AppNotificationBridge : public content::NotificationObserver {
@synthesize delayOnClose = delayOnClose_;
@synthesize canBecomeKeyWindow = canBecomeKeyWindow_;
+@synthesize hasBlurredBackground = hasBlurredBackground_;
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle
@@ -130,6 +131,7 @@ class AppNotificationBridge : public content::NotificationObserver {
[self setHasShadow:YES];
delayOnClose_ = YES;
canBecomeKeyWindow_ = YES;
+ hasBlurredBackground_ = YES;
notificationBridge_.reset(new AppNotificationBridge(self));
// Start invisible. Will be made visible when ordered front.
@@ -223,20 +225,22 @@ class AppNotificationBridge : public content::NotificationObserver {
[self setFrameOrigin:newOrigin];
// Add a gaussian blur to the window.
- CGSConnection cgsConnection = _CGSDefaultConnection();
- CGSWindowFilterRef filter;
- if (CGSNewCIFilterByName(cgsConnection, CFSTR("CIGaussianBlur"),
- &filter) == kCGErrorSuccess) {
- NSDictionary* blurOptions =
- [NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:1.5]
- forKey:@"inputRadius"];
-
- if (CGSSetCIFilterValuesFromDictionary(cgsConnection, filter,
- base::mac::NSToCFCast(blurOptions)) == kCGErrorSuccess) {
- CGSAddWindowFilter(cgsConnection, [self windowNumber], filter, 1);
+ if (hasBlurredBackground_) {
+ CGSConnection cgsConnection = _CGSDefaultConnection();
+ CGSWindowFilterRef filter;
+ if (CGSNewCIFilterByName(cgsConnection, CFSTR("CIGaussianBlur"),
+ &filter) == kCGErrorSuccess) {
+ NSDictionary* blurOptions =
+ [NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:1.5]
+ forKey:@"inputRadius"];
+
+ if (CGSSetCIFilterValuesFromDictionary(cgsConnection, filter,
+ base::mac::NSToCFCast(blurOptions)) == kCGErrorSuccess) {
+ CGSAddWindowFilter(cgsConnection, [self windowNumber], filter, 1);
+ }
+
+ CGSReleaseCIFilter(cgsConnection, filter);
}
-
- CGSReleaseCIFilter(cgsConnection, filter);
}
// Apply animations to show and move self.
« no previous file with comments | « chrome/browser/ui/cocoa/info_bubble_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698