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

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

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, 1 month 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/views/controls/webview/web_dialog_view.cc ('k') | ui/web_dialogs/web_dialog_delegate.cc » ('j') | 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 #ifndef UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_ 5 #ifndef UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_
6 #define UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_ 6 #define UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Get the size of the dialog. 57 // Get the size of the dialog.
58 virtual void GetDialogSize(gfx::Size* size) const = 0; 58 virtual void GetDialogSize(gfx::Size* size) const = 0;
59 59
60 // Get the size of the dialog. 60 // Get the size of the dialog.
61 virtual void GetMinimumDialogSize(gfx::Size* size) const; 61 virtual void GetMinimumDialogSize(gfx::Size* size) const;
62 62
63 // Gets the JSON string input to use when showing the dialog. 63 // Gets the JSON string input to use when showing the dialog.
64 virtual std::string GetDialogArgs() const = 0; 64 virtual std::string GetDialogArgs() const = 0;
65 65
66 // Returns true to signal that the dialog can be closed. Specialized
67 // WebDialogDelegate subclasses can override this default behavior to allow
68 // the close to be blocked until the user corrects mistakes, accepts an
69 // agreement, etc.
70 virtual bool CanCloseDialog() const;
71
66 // A callback to notify the delegate that |source|'s loading state has 72 // A callback to notify the delegate that |source|'s loading state has
67 // changed. 73 // changed.
68 virtual void OnLoadingStateChanged(content::WebContents* source) {} 74 virtual void OnLoadingStateChanged(content::WebContents* source) {}
69 75
70 // A callback to notify the delegate that a web dialog has been shown. 76 // A callback to notify the delegate that a web dialog has been shown.
71 // |webui| is the WebUI with which the dialog is associated. 77 // |webui| is the WebUI with which the dialog is associated.
72 // |render_view_host| is the RenderViewHost for the shown dialog. 78 // |render_view_host| is the RenderViewHost for the shown dialog.
73 virtual void OnDialogShown(content::WebUI* webui, 79 virtual void OnDialogShown(content::WebUI* webui,
74 content::RenderViewHost* render_view_host) {} 80 content::RenderViewHost* render_view_host) {}
75 81
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 126
121 // Stores the dialog bounds. 127 // Stores the dialog bounds.
122 virtual void StoreDialogSize(const gfx::Size& dialog_size) {} 128 virtual void StoreDialogSize(const gfx::Size& dialog_size) {}
123 129
124 virtual ~WebDialogDelegate() {} 130 virtual ~WebDialogDelegate() {}
125 }; 131 };
126 132
127 } // namespace ui 133 } // namespace ui
128 134
129 #endif // UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_ 135 #endif // UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.cc ('k') | ui/web_dialogs/web_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698