| 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 aa4b5c982f949bfcc43a6268f624eb2211a51347..eda0f2c130f2cd86ee929882095c88fabcd7591b 100644
|
| --- a/chrome/browser/ui/cocoa/info_bubble_window.mm
|
| +++ b/chrome/browser/ui/cocoa/info_bubble_window.mm
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/logging.h"
|
| +#include "base/mac/foundation_util.h"
|
| #include "base/memory/scoped_nsobject.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| @@ -22,9 +23,28 @@ const NSTimeInterval kOrderOutAnimationDuration = 0.15;
|
| // animation as quickly as possible.
|
| const NSTimeInterval kMinimumTimeInterval =
|
| std::numeric_limits<NSTimeInterval>::min();
|
| -}
|
| -
|
| -@interface InfoBubbleWindow(Private)
|
| +} // namespace
|
| +
|
| +// Forward declare private window server functions used to style the window.
|
| +extern "C" {
|
| +typedef int CGSConnection;
|
| +typedef int CGSWindow;
|
| +typedef void* CGSWindowFilterRef;
|
| +
|
| +CGSConnection _CGSDefaultConnection();
|
| +CGError CGSNewCIFilterByName(CGSConnection cid,
|
| + CFStringRef filterName,
|
| + CGSWindowFilterRef *outFilter);
|
| +CGError CGSAddWindowFilter(CGSConnection cid,
|
| + CGSWindow wid,
|
| + CGSWindowFilterRef filter,
|
| + int flags);
|
| +CGError CGSReleaseCIFilter(CGSConnection cid, CGSWindowFilterRef filter);
|
| +CGError CGSSetCIFilterValuesFromDictionary(
|
| + CGSConnection cid, CGSWindowFilterRef filter, CFDictionaryRef filterValues);
|
| +} // extern "C"
|
| +
|
| +@interface InfoBubbleWindow (Private)
|
| - (void)appIsTerminating;
|
| - (void)finishCloseAfterAnimation;
|
| @end
|
| @@ -202,6 +222,23 @@ class AppNotificationBridge : public content::NotificationObserver {
|
| newOrigin.y += kOrderInSlideOffset;
|
| [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);
|
| + }
|
| +
|
| + CGSReleaseCIFilter(cgsConnection, filter);
|
| + }
|
| +
|
| // Apply animations to show and move self.
|
| [NSAnimationContext beginGrouping];
|
| // The star currently triggers on mouse down, not mouse up.
|
|
|