| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_ |
| 6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_ | 6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 id<ConstrainedWindowSheet> sheet); | 34 id<ConstrainedWindowSheet> sheet); |
| 35 virtual ~ConstrainedWindowMac(); | 35 virtual ~ConstrainedWindowMac(); |
| 36 | 36 |
| 37 void ShowWebContentsModalDialog(); | 37 void ShowWebContentsModalDialog(); |
| 38 // Closes the constrained window and deletes this instance. | 38 // Closes the constrained window and deletes this instance. |
| 39 void CloseWebContentsModalDialog(); | 39 void CloseWebContentsModalDialog(); |
| 40 void FocusWebContentsModalDialog(); | 40 void FocusWebContentsModalDialog(); |
| 41 void PulseWebContentsModalDialog(); | 41 void PulseWebContentsModalDialog(); |
| 42 web_modal::NativeWebContentsModalDialog GetNativeDialog(); | 42 web_modal::NativeWebContentsModalDialog GetNativeDialog(); |
| 43 | 43 |
| 44 void SetPreventCloseOnLoadStart(bool prevent); |
| 45 |
| 44 private: | 46 private: |
| 45 // Gets the parent window of the dialog. | 47 // Gets the parent window of the dialog. |
| 46 NSWindow* GetParentWindow() const; | 48 NSWindow* GetParentWindow() const; |
| 47 | 49 |
| 48 ConstrainedWindowMacDelegate* delegate_; // weak, owns us. | 50 ConstrainedWindowMacDelegate* delegate_; // weak, owns us. |
| 49 | 51 |
| 50 // The WebContents that owns and constrains this ConstrainedWindowMac. Weak. | 52 // The WebContents that owns and constrains this ConstrainedWindowMac. Weak. |
| 51 content::WebContents* web_contents_; | 53 content::WebContents* web_contents_; |
| 52 | 54 |
| 53 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; | 55 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; |
| 54 | 56 |
| 55 // This is true if the constrained window has been shown. | 57 // This is true if the constrained window has been shown. |
| 56 bool shown_; | 58 bool shown_; |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_ | 61 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_MAC_ |
| OLD | NEW |