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_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_ | 5 #ifndef COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_ | 6 #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_ |
7 | |
8 class WebContentsModalDialogHost; | |
9 | 7 |
10 namespace content { | 8 namespace content { |
11 class WebContents; | 9 class WebContents; |
12 } | 10 } |
13 | 11 |
14 namespace gfx { | 12 namespace gfx { |
15 class Point; | 13 class Point; |
16 } | 14 } |
17 | 15 |
| 16 namespace web_modal { |
| 17 |
| 18 class WebContentsModalDialogHost; |
| 19 |
18 class WebContentsModalDialogManagerDelegate { | 20 class WebContentsModalDialogManagerDelegate { |
19 public: | 21 public: |
20 // Changes the blocked state of |web_contents|. WebContentses are considered | 22 // Changes the blocked state of |web_contents|. WebContentses are considered |
21 // blocked while displaying a web contents modal dialog. During that time | 23 // blocked while displaying a web contents modal dialog. During that time |
22 // renderer host will ignore any UI interaction within WebContents outside of | 24 // renderer host will ignore any UI interaction within WebContents outside of |
23 // the currently displaying dialog. | 25 // the currently displaying dialog. |
24 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 26 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
25 bool blocked); | 27 bool blocked); |
26 | 28 |
27 // Returns the WebContentsModalDialogHost for use in positioning web contents | 29 // Returns the WebContentsModalDialogHost for use in positioning web contents |
28 // modal dialogs within the browser window. | 30 // modal dialogs within the browser window. |
29 virtual WebContentsModalDialogHost* GetWebContentsModalDialogHost(); | 31 virtual WebContentsModalDialogHost* GetWebContentsModalDialogHost(); |
30 | 32 |
| 33 // Returns whether the WebContents is currently visible or not. |
| 34 virtual bool IsWebContentsVisible(content::WebContents* web_contents); |
| 35 |
31 protected: | 36 protected: |
32 virtual ~WebContentsModalDialogManagerDelegate(); | 37 virtual ~WebContentsModalDialogManagerDelegate(); |
33 }; | 38 }; |
34 | 39 |
35 #endif // CHROME_BROWSER_UI_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_ | 40 } // namespace web_modal |
| 41 |
| 42 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_ |
OLD | NEW |