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

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

Issue 10805059: Merge 147628 - Disable blurring for extension bubbles (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: 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
===================================================================
--- chrome/browser/ui/cocoa/info_bubble_window.mm (revision 147881)
+++ chrome/browser/ui/cocoa/info_bubble_window.mm (working copy)
@@ -115,6 +115,7 @@
@synthesize delayOnClose = delayOnClose_;
@synthesize canBecomeKeyWindow = canBecomeKeyWindow_;
+@synthesize hasBlurredBackground = hasBlurredBackground_;
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle
@@ -130,6 +131,7 @@
[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 @@
[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 (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);
+ 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