Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h

Issue 319013002: Reland Fix Views web-modal dialog widget creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert MediaGalleriesScanResultDialogViews::AcceptDialogForTesting. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" 11 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
12 12
13 namespace content { 13 namespace content {
14 class BrowserContext; 14 class BrowserContext;
15 } 15 }
16 16
17 namespace ui { 17 namespace ui {
18 class WebDialogDelegate; 18 class WebDialogDelegate;
19 } 19 }
20 20
21 // Platform-agnostic base implementation of ConstrainedWebDialogDelegate. 21 // Platform-agnostic base implementation of ConstrainedWebDialogDelegate.
22 class ConstrainedWebDialogDelegateBase 22 class ConstrainedWebDialogDelegateBase
23 : public ConstrainedWebDialogDelegate, 23 : public ConstrainedWebDialogDelegate,
24 public ui::WebDialogWebContentsDelegate { 24 public ui::WebDialogWebContentsDelegate {
25 public: 25 public:
26 ConstrainedWebDialogDelegateBase( 26 ConstrainedWebDialogDelegateBase(content::BrowserContext* browser_context,
27 content::BrowserContext* browser_context, 27 ui::WebDialogDelegate* delegate,
28 ui::WebDialogDelegate* delegate, 28 WebDialogWebContentsDelegate* tab_delegate);
29 WebDialogWebContentsDelegate* tab_delegate);
30 virtual ~ConstrainedWebDialogDelegateBase(); 29 virtual ~ConstrainedWebDialogDelegateBase();
31 30
32 bool closed_via_webui() const; 31 bool closed_via_webui() const;
33 32
34 // ConstrainedWebDialogDelegate interface. 33 // ConstrainedWebDialogDelegate interface.
35 virtual const ui::WebDialogDelegate* 34 virtual const ui::WebDialogDelegate* GetWebDialogDelegate() const OVERRIDE;
36 GetWebDialogDelegate() const OVERRIDE;
37 virtual ui::WebDialogDelegate* GetWebDialogDelegate() OVERRIDE; 35 virtual ui::WebDialogDelegate* GetWebDialogDelegate() OVERRIDE;
38 virtual void OnDialogCloseFromWebUI() OVERRIDE; 36 virtual void OnDialogCloseFromWebUI() OVERRIDE;
39 virtual void ReleaseWebContentsOnDialogClose() OVERRIDE; 37 virtual void ReleaseWebContentsOnDialogClose() OVERRIDE;
40 virtual web_modal::NativeWebContentsModalDialog GetNativeDialog() OVERRIDE; 38 virtual web_modal::NativeWebContentsModalDialog GetNativeDialog() OVERRIDE;
41 virtual content::WebContents* GetWebContents() OVERRIDE; 39 virtual content::WebContents* GetWebContents() OVERRIDE;
42 40
43 // WebDialogWebContentsDelegate interface. 41 // WebDialogWebContentsDelegate interface.
44 virtual void HandleKeyboardEvent( 42 virtual void HandleKeyboardEvent(
45 content::WebContents* source, 43 content::WebContents* source,
46 const content::NativeWebKeyboardEvent& event) OVERRIDE; 44 const content::NativeWebKeyboardEvent& event) OVERRIDE;
(...skipping 10 matching lines...) Expand all
57 55
58 // If true, release |web_contents_| on close instead of destroying it. 56 // If true, release |web_contents_| on close instead of destroying it.
59 bool release_contents_on_close_; 57 bool release_contents_on_close_;
60 58
61 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; 59 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_;
62 60
63 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); 61 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase);
64 }; 62 };
65 63
66 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ 64 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698