OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_ |
7 | 7 |
8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/web_modal/single_web_contents_dialog_manager.h" | 10 #include "components/web_modal/single_web_contents_dialog_manager.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void Close() override; | 29 void Close() override; |
30 void Focus() override; | 30 void Focus() override; |
31 void Pulse() override; | 31 void Pulse() override; |
32 void HostChanged(web_modal::WebContentsModalDialogHost* new_host) override; | 32 void HostChanged(web_modal::WebContentsModalDialogHost* new_host) override; |
33 gfx::NativeWindow dialog() override; | 33 gfx::NativeWindow dialog() override; |
34 | 34 |
35 private: | 35 private: |
36 // Weak. Legacy DialogManager-style delegate interface that Cocoa uses. | 36 // Weak. Legacy DialogManager-style delegate interface that Cocoa uses. |
37 ConstrainedWindowMac* client_; | 37 ConstrainedWindowMac* client_; |
38 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; | 38 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; |
| 39 // Reference to the sheet window hosted by |sheet_|. |
| 40 NSWindow* dialog_; |
39 // Weak. Owns this. | 41 // Weak. Owns this. |
40 web_modal::SingleWebContentsDialogManagerDelegate* delegate_; | 42 web_modal::SingleWebContentsDialogManagerDelegate* delegate_; |
41 // Weak. Owned by parent window. | 43 // Weak. Owned by parent window. |
42 web_modal::WebContentsModalDialogHost* host_; | 44 web_modal::WebContentsModalDialogHost* host_; |
43 | 45 |
44 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManagerCocoa); | 46 DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManagerCocoa); |
45 }; | 47 }; |
46 | 48 |
47 #endif // CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_ | 49 #endif // CHROME_BROWSER_UI_COCOA_SINGLE_WEB_CONTENTS_DIALOG_MANAGER_COCOA_H_ |
OLD | NEW |