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

Side by Side Diff: ui/web_dialogs/web_dialog_delegate.cc

Issue 82913007: Add CanCloseDialog to WebDialogDelegate to allow blocking closing of dialog if needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « ui/web_dialogs/web_dialog_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/web_dialogs/web_dialog_delegate.h" 5 #include "ui/web_dialogs/web_dialog_delegate.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 std::string WebDialogDelegate::GetDialogName() const { 9 std::string WebDialogDelegate::GetDialogName() const {
10 return std::string(); 10 return std::string();
11 } 11 }
12 12
13 void WebDialogDelegate::GetMinimumDialogSize(gfx::Size* size) const { 13 void WebDialogDelegate::GetMinimumDialogSize(gfx::Size* size) const {
14 GetDialogSize(size); 14 GetDialogSize(size);
15 } 15 }
16 16
17 bool WebDialogDelegate::CanCloseDialog() const {
18 return true;
19 }
20
17 void WebDialogDelegate::OnDialogCloseFromWebUI( 21 void WebDialogDelegate::OnDialogCloseFromWebUI(
18 const std::string& json_retval) { 22 const std::string& json_retval) {
19 OnDialogClosed(json_retval); 23 OnDialogClosed(json_retval);
20 } 24 }
21 25
22 bool WebDialogDelegate::HandleContextMenu( 26 bool WebDialogDelegate::HandleContextMenu(
23 const content::ContextMenuParams& params) { 27 const content::ContextMenuParams& params) {
24 return false; 28 return false;
25 } 29 }
26 30
27 bool WebDialogDelegate::HandleOpenURLFromTab( 31 bool WebDialogDelegate::HandleOpenURLFromTab(
28 content::WebContents* source, 32 content::WebContents* source,
29 const content::OpenURLParams& params, 33 const content::OpenURLParams& params,
30 content::WebContents** out_new_contents) { 34 content::WebContents** out_new_contents) {
31 return false; 35 return false;
32 } 36 }
33 37
34 bool WebDialogDelegate::HandleAddNewContents( 38 bool WebDialogDelegate::HandleAddNewContents(
35 content::WebContents* source, 39 content::WebContents* source,
36 content::WebContents* new_contents, 40 content::WebContents* new_contents,
37 WindowOpenDisposition disposition, 41 WindowOpenDisposition disposition,
38 const gfx::Rect& initial_pos, 42 const gfx::Rect& initial_pos,
39 bool user_gesture) { 43 bool user_gesture) {
40 return false; 44 return false;
41 } 45 }
42 46
43 } // namespace ui 47 } // namespace ui
OLDNEW
« no previous file with comments | « ui/web_dialogs/web_dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698