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/webui/constrained_web_dialog_ui.h" | 9 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
10 #include "ui/web_dialogs/web_dialog_ui.h" | 10 #include "ui/web_dialogs/web_dialog_ui.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 gfx::NativeWindow GetNativeDialog() override; | 39 gfx::NativeWindow GetNativeDialog() override; |
40 gfx::Size GetMinimumSize() const override; | 40 gfx::Size GetMinimumSize() const override; |
41 gfx::Size GetMaximumSize() const override; | 41 gfx::Size GetMaximumSize() const override; |
42 gfx::Size GetPreferredSize() const override; | 42 gfx::Size GetPreferredSize() const override; |
43 | 43 |
44 // WebDialogWebContentsDelegate interface. | 44 // WebDialogWebContentsDelegate interface. |
45 void HandleKeyboardEvent( | 45 void HandleKeyboardEvent( |
46 content::WebContents* source, | 46 content::WebContents* source, |
47 const content::NativeWebKeyboardEvent& event) override; | 47 const content::NativeWebKeyboardEvent& event) override; |
48 | 48 |
| 49 // Resize the dialog to the given size. |
| 50 virtual void ResizeToGivenSize(const gfx::Size size); |
| 51 |
49 private: | 52 private: |
50 scoped_ptr<ui::WebDialogDelegate> web_dialog_delegate_; | 53 scoped_ptr<ui::WebDialogDelegate> web_dialog_delegate_; |
51 | 54 |
52 // Holds the HTML to display in the constrained dialog. | 55 // Holds the HTML to display in the constrained dialog. |
53 scoped_ptr<content::WebContents> web_contents_; | 56 scoped_ptr<content::WebContents> web_contents_; |
54 | 57 |
55 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s | 58 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s |
56 // OnDialogClosed() method has already been called)? | 59 // OnDialogClosed() method has already been called)? |
57 bool closed_via_webui_; | 60 bool closed_via_webui_; |
58 | 61 |
59 // If true, release |web_contents_| on close instead of destroying it. | 62 // If true, release |web_contents_| on close instead of destroying it. |
60 bool release_contents_on_close_; | 63 bool release_contents_on_close_; |
61 | 64 |
62 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; | 65 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; |
63 | 66 |
64 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); | 67 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); |
65 }; | 68 }; |
66 | 69 |
67 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ | 70 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ |
OLD | NEW |