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

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

Issue 10332231: Remove chrome::NOTIFICATION_WEB_DIALOG_SHOWN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add web_dialog_observer.h to chrome_browser.gypi Created 8 years, 7 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_WEB_DIALOG_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_WEB_DIALOG_DELEGATE_H_
6 #define CHROME_BROWSER_UI_WEBUI_WEB_DIALOG_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_WEB_DIALOG_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "ui/base/ui_base_types.h" 13 #include "ui/base/ui_base_types.h"
14 #include "webkit/glue/window_open_disposition.h" 14 #include "webkit/glue/window_open_disposition.h"
15 15
16 class GURL; 16 class GURL;
17 17
18 namespace content { 18 namespace content {
19 class RenderViewHost;
20 class WebContents;
21 class WebUI;
19 class WebUIMessageHandler; 22 class WebUIMessageHandler;
20 class WebContents;
21 struct ContextMenuParams; 23 struct ContextMenuParams;
22 struct OpenURLParams; 24 struct OpenURLParams;
23 } 25 }
24 26
25 namespace gfx { 27 namespace gfx {
26 class Rect; 28 class Rect;
27 class Size; 29 class Size;
28 } 30 }
29 31
30 // Implement this class to receive notifications. 32 // Implement this class to receive notifications.
(...skipping 25 matching lines...) Expand all
56 // Get the size of the dialog. 58 // Get the size of the dialog.
57 virtual void GetMinimumDialogSize(gfx::Size* size) const; 59 virtual void GetMinimumDialogSize(gfx::Size* size) const;
58 60
59 // Gets the JSON string input to use when showing the dialog. 61 // Gets the JSON string input to use when showing the dialog.
60 virtual std::string GetDialogArgs() const = 0; 62 virtual std::string GetDialogArgs() const = 0;
61 63
62 // A callback to notify the delegate that |source|'s loading state has 64 // A callback to notify the delegate that |source|'s loading state has
63 // changed. 65 // changed.
64 virtual void OnLoadingStateChanged(content::WebContents* source) {} 66 virtual void OnLoadingStateChanged(content::WebContents* source) {}
65 67
68 // A callback to notify the delegate that a web dialog has been shown.
69 // |webui| is the WebUI with which the dialog is associated.
70 // |render_view_host| is the RenderViewHost for the shown dialog.
71 virtual void OnDialogShown(content::WebUI* webui,
72 content::RenderViewHost* render_view_host) {}
73
66 // A callback to notify the delegate that the dialog closed. 74 // A callback to notify the delegate that the dialog closed.
67 // IMPORTANT: Implementations should delete |this| here (unless they've 75 // IMPORTANT: Implementations should delete |this| here (unless they've
68 // arranged for the delegate to be deleted in some other way, e.g. by 76 // arranged for the delegate to be deleted in some other way, e.g. by
69 // registering it as a message handler in the WebUI object). 77 // registering it as a message handler in the WebUI object).
70 virtual void OnDialogClosed(const std::string& json_retval) = 0; 78 virtual void OnDialogClosed(const std::string& json_retval) = 0;
71 79
72 // A callback to notify the delegate that the contents have gone 80 // A callback to notify the delegate that the contents have gone
73 // away. Only relevant if your dialog hosts code that calls 81 // away. Only relevant if your dialog hosts code that calls
74 // windows.close() and you've allowed that. If the output parameter 82 // windows.close() and you've allowed that. If the output parameter
75 // is set to true, then the dialog is closed. The default is false. 83 // is set to true, then the dialog is closed. The default is false.
(...skipping 30 matching lines...) Expand all
106 114
107 // Stores the dialog bounds. 115 // Stores the dialog bounds.
108 virtual void StoreDialogSize(const gfx::Size& dialog_size) {} 116 virtual void StoreDialogSize(const gfx::Size& dialog_size) {}
109 117
110 protected: 118 protected:
111 virtual ~WebDialogDelegate() {} 119 virtual ~WebDialogDelegate() {}
112 }; 120 };
113 121
114 122
115 #endif // CHROME_BROWSER_UI_WEBUI_WEB_DIALOG_DELEGATE_H_ 123 #endif // CHROME_BROWSER_UI_WEBUI_WEB_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/constrained_web_dialog_ui.cc ('k') | chrome/browser/ui/webui/web_dialog_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698