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_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
10 #include "ui/web_dialogs/constrained_web_dialog_ui.h" | 10 #include "ui/web_dialogs/constrained_web_dialog_ui.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 virtual const ui::WebDialogDelegate* | 33 virtual const ui::WebDialogDelegate* |
34 GetWebDialogDelegate() const OVERRIDE; | 34 GetWebDialogDelegate() const OVERRIDE; |
35 virtual ui::WebDialogDelegate* GetWebDialogDelegate() OVERRIDE; | 35 virtual ui::WebDialogDelegate* GetWebDialogDelegate() OVERRIDE; |
36 virtual void OnDialogCloseFromWebUI() OVERRIDE; | 36 virtual void OnDialogCloseFromWebUI() OVERRIDE; |
37 virtual void ReleaseTabContentsOnDialogClose() OVERRIDE; | 37 virtual void ReleaseTabContentsOnDialogClose() OVERRIDE; |
38 virtual ConstrainedWindow* window() OVERRIDE; | 38 virtual ConstrainedWindow* window() OVERRIDE; |
39 virtual TabContents* tab() OVERRIDE; | 39 virtual TabContents* tab() OVERRIDE; |
40 | 40 |
41 // WebDialogWebContentsDelegate interface. | 41 // WebDialogWebContentsDelegate interface. |
42 virtual void HandleKeyboardEvent( | 42 virtual void HandleKeyboardEvent( |
| 43 content::WebContents* source, |
43 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 44 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
44 | 45 |
45 protected: | 46 protected: |
46 void set_override_tab_delegate( | 47 void set_override_tab_delegate( |
47 WebDialogWebContentsDelegate* override_tab_delegate); | 48 WebDialogWebContentsDelegate* override_tab_delegate); |
48 | 49 |
49 private: | 50 private: |
50 ui::WebDialogDelegate* web_dialog_delegate_; | 51 ui::WebDialogDelegate* web_dialog_delegate_; |
51 | 52 |
52 // The constrained window that owns |this|. Saved so we can close it later. | 53 // The constrained window that owns |this|. Saved so we can close it later. |
53 ConstrainedWindow* window_; | 54 ConstrainedWindow* window_; |
54 | 55 |
55 // Holds the HTML to display in the constrained dialog. | 56 // Holds the HTML to display in the constrained dialog. |
56 scoped_ptr<TabContents> tab_; | 57 scoped_ptr<TabContents> tab_; |
57 | 58 |
58 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s | 59 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s |
59 // OnDialogClosed() method has already been called)? | 60 // OnDialogClosed() method has already been called)? |
60 bool closed_via_webui_; | 61 bool closed_via_webui_; |
61 | 62 |
62 // If true, release |tab_| on close instead of destroying it. | 63 // If true, release |tab_| on close instead of destroying it. |
63 bool release_tab_on_close_; | 64 bool release_tab_on_close_; |
64 | 65 |
65 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; | 66 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); | 68 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); |
68 }; | 69 }; |
69 | 70 |
70 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ | 71 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ |
OLD | NEW |