| Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h
|
| diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h
|
| index 24ef877772166c2c7666d205a69f63c2a4848c79..8704135e14ebc09551632f3f3e464a9db2c57bd2 100644
|
| --- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h
|
| +++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h
|
| @@ -9,6 +9,8 @@
|
|
|
| #include "base/memory/scoped_nsobject.h"
|
| #include "chrome/browser/ui/constrained_window.h"
|
| +#include "content/public/browser/notification_observer.h"
|
| +#include "content/public/browser/notification_registrar.h"
|
|
|
| namespace content {
|
| class WebContents;
|
| @@ -25,7 +27,8 @@ class ConstrainedWindowMacDelegate2 {
|
| // Constrained window implementation for Mac.
|
| // Normally an instance of this class is owned by the delegate. The delegate
|
| // should delete the instance when the window is closed.
|
| -class ConstrainedWindowMac2 : public ConstrainedWindow {
|
| +class ConstrainedWindowMac2 : public ConstrainedWindow,
|
| + public content::NotificationObserver {
|
| public:
|
| ConstrainedWindowMac2(ConstrainedWindowMacDelegate2* delegate,
|
| content::WebContents* web_contents,
|
| @@ -40,6 +43,11 @@ class ConstrainedWindowMac2 : public ConstrainedWindow {
|
| virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
|
| virtual bool CanShowConstrainedWindow() OVERRIDE;
|
|
|
| + // content::NotificationObserver:
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| private:
|
| // Gets the parent window of the dialog.
|
| NSWindow* GetParentWindow() const;
|
| @@ -50,6 +58,12 @@ class ConstrainedWindowMac2 : public ConstrainedWindow {
|
| content::WebContents* web_contents_;
|
|
|
| scoped_nsobject<NSWindow> window_;
|
| +
|
| + // A scoped container for notification registries.
|
| + content::NotificationRegistrar registrar_;
|
| +
|
| + // This is true if the constrained window is waiting to be shown.
|
| + bool pending_show_;
|
| };
|
|
|
| #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_2_
|
|
|