Chromium Code Reviews| 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 25 matching lines...) Expand all Loading... | |
| 36 void OnDialogCloseFromWebUI() override; | 36 void OnDialogCloseFromWebUI() override; |
| 37 void ReleaseWebContentsOnDialogClose() override; | 37 void ReleaseWebContentsOnDialogClose() override; |
| 38 web_modal::NativeWebContentsModalDialog GetNativeDialog() override; | 38 web_modal::NativeWebContentsModalDialog GetNativeDialog() override; |
| 39 content::WebContents* GetWebContents() override; | 39 content::WebContents* GetWebContents() override; |
| 40 | 40 |
| 41 // WebDialogWebContentsDelegate interface. | 41 // WebDialogWebContentsDelegate interface. |
| 42 void HandleKeyboardEvent( | 42 void HandleKeyboardEvent( |
| 43 content::WebContents* source, | 43 content::WebContents* source, |
| 44 const content::NativeWebKeyboardEvent& event) override; | 44 const content::NativeWebKeyboardEvent& event) override; |
| 45 | 45 |
| 46 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) | |
| 47 void EnableAutoResize(const gfx::Size& min_size, | |
|
miu
2014/11/26 00:47:44
This method should be removed in this class. See
apacible
2014/11/26 17:35:15
Done.
| |
| 48 const gfx::Size& max_size) override; | |
| 49 #endif | |
| 50 | |
| 46 private: | 51 private: |
| 47 scoped_ptr<ui::WebDialogDelegate> web_dialog_delegate_; | 52 scoped_ptr<ui::WebDialogDelegate> web_dialog_delegate_; |
| 48 | 53 |
| 49 // Holds the HTML to display in the constrained dialog. | 54 // Holds the HTML to display in the constrained dialog. |
| 50 scoped_ptr<content::WebContents> web_contents_; | 55 scoped_ptr<content::WebContents> web_contents_; |
| 51 | 56 |
| 52 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s | 57 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s |
| 53 // OnDialogClosed() method has already been called)? | 58 // OnDialogClosed() method has already been called)? |
| 54 bool closed_via_webui_; | 59 bool closed_via_webui_; |
| 55 | 60 |
| 56 // If true, release |web_contents_| on close instead of destroying it. | 61 // If true, release |web_contents_| on close instead of destroying it. |
| 57 bool release_contents_on_close_; | 62 bool release_contents_on_close_; |
| 58 | 63 |
| 59 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; | 64 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; |
| 60 | 65 |
| 61 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); | 66 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); |
| 62 }; | 67 }; |
| 63 | 68 |
| 64 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ | 69 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ |
| OLD | NEW |