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

Side by Side Diff: chrome/browser/render_view_host_delegate.h

Issue 7650: Move more platform-specific stuff from WebContents to the view.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_RENDER_VIEW_HOST_DELEGATE_H__ 5 #ifndef CHROME_BROWSER_RENDER_VIEW_HOST_DELEGATE_H__
6 #define CHROME_BROWSER_RENDER_VIEW_HOST_DELEGATE_H__ 6 #define CHROME_BROWSER_RENDER_VIEW_HOST_DELEGATE_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // the Windows function which is actually a #define. 69 // the Windows function which is actually a #define.
70 virtual void ShowCreatedWindow(int route_id, 70 virtual void ShowCreatedWindow(int route_id,
71 WindowOpenDisposition disposition, 71 WindowOpenDisposition disposition,
72 const gfx::Rect& initial_pos, 72 const gfx::Rect& initial_pos,
73 bool user_gesture) = 0; 73 bool user_gesture) = 0;
74 74
75 // Show the newly created widget with the specified bounds. 75 // Show the newly created widget with the specified bounds.
76 // The widget is identified by the route_id passed to CreateNewWidget. 76 // The widget is identified by the route_id passed to CreateNewWidget.
77 virtual void ShowCreatedWidget(int route_id, 77 virtual void ShowCreatedWidget(int route_id,
78 const gfx::Rect& initial_pos) = 0; 78 const gfx::Rect& initial_pos) = 0;
79
80 // A context menu should be shown, to be built using the context information
81 // provided in the supplied params.
82 virtual void ShowContextMenu(
83 const ViewHostMsg_ContextMenu_Params& params) = 0;
84
85 // The user started dragging content of the specified type within the
86 // RenderView. Contextual information about the dragged content is supplied
87 // by WebDropData.
88 virtual void StartDragging(const WebDropData& drop_data) = 0;
89
90 // The page wants to update the mouse cursor during a drag & drop operation.
91 // |is_drop_target| is true if the mouse is over a valid drop target.
92 virtual void UpdateDragCursor(bool is_drop_target) = 0;
93
94 // Callback to inform the browser it should take back focus. If reverse is
95 // true, it means the focus was retrieved by doing a Shift-Tab.
96 virtual void TakeFocus(bool reverse) = 0;
97
98 // Callback to inform the browser that the renderer did not process the
99 // specified events. This gives an opportunity to the browser to process the
100 // event (used for keyboard shortcuts).
101 virtual void HandleKeyboardEvent(const WebKeyboardEvent& event) = 0;
79 }; 102 };
80 103
81 class FindInPage { 104 class FindInPage {
82 public: 105 public:
83 // A find operation in the current page completed. 106 // A find operation in the current page completed.
84 virtual void FindReply(int request_id, 107 virtual void FindReply(int request_id,
85 int number_of_matches, 108 int number_of_matches,
86 const gfx::Rect& selection_rect, 109 const gfx::Rect& selection_rect,
87 int active_match_ordinal, 110 int active_match_ordinal,
88 bool final_update) = 0; 111 bool final_update) = 0;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 int32 page_id, const GURL& icon_url) { } 224 int32 page_id, const GURL& icon_url) { }
202 225
203 // An image that was requested to be downloaded by DownloadImage has 226 // An image that was requested to be downloaded by DownloadImage has
204 // completed. 227 // completed.
205 virtual void DidDownloadImage(RenderViewHost* render_view_host, 228 virtual void DidDownloadImage(RenderViewHost* render_view_host,
206 int id, 229 int id,
207 const GURL& image_url, 230 const GURL& image_url,
208 bool errored, 231 bool errored,
209 const SkBitmap& image) { } 232 const SkBitmap& image) { }
210 233
211 // A context menu should be shown, to be built using the context information
212 // provided in the supplied params.
213 virtual void ShowContextMenu(const ViewHostMsg_ContextMenu_Params& params) {
214 }
215
216 // The user started dragging content of the specified type within the
217 // RenderView. Contextual information about the dragged content is supplied
218 // by WebDropData.
219 virtual void StartDragging(const WebDropData& drop_data) { }
220
221 // The page wants to update the mouse cursor during a drag & drop operation.
222 // |is_drop_target| is true if the mouse is over a valid drop target.
223 virtual void UpdateDragCursor(bool is_drop_target) { }
224
225 // The page wants to open a URL with the specified disposition. 234 // The page wants to open a URL with the specified disposition.
226 virtual void RequestOpenURL(const GURL& url, 235 virtual void RequestOpenURL(const GURL& url,
227 WindowOpenDisposition disposition) { } 236 WindowOpenDisposition disposition) { }
228 237
229 // A DOM automation operation completed. The result of the operation is 238 // A DOM automation operation completed. The result of the operation is
230 // expressed in a json string. 239 // expressed in a json string.
231 virtual void DomOperationResponse(const std::string& json_string, 240 virtual void DomOperationResponse(const std::string& json_string,
232 int automation_id) { } 241 int automation_id) { }
233 242
234 // A message was sent from HTML-based UI. 243 // A message was sent from HTML-based UI.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Display this RenderViewHost in a modal fashion. 276 // Display this RenderViewHost in a modal fashion.
268 virtual void RunModal(IPC::Message* reply_msg) { } 277 virtual void RunModal(IPC::Message* reply_msg) { }
269 278
270 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, 279 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
271 const std::string& json_arguments, 280 const std::string& json_arguments,
272 IPC::Message* reply_msg) { } 281 IPC::Message* reply_msg) { }
273 282
274 // Password forms have been detected in the page. 283 // Password forms have been detected in the page.
275 virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms) { } 284 virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms) { }
276 285
277 // Callback to inform the browser it should take back focus. If reverse is
278 // true, it means the focus was retrieved by doing a Shift-Tab.
279 virtual void TakeFocus(bool reverse) { }
280
281 // Notification that the page has an OpenSearch description document. 286 // Notification that the page has an OpenSearch description document.
282 virtual void PageHasOSDD(RenderViewHost* render_view_host, 287 virtual void PageHasOSDD(RenderViewHost* render_view_host,
283 int32 page_id, const GURL& doc_url, 288 int32 page_id, const GURL& doc_url,
284 bool autodetected) { } 289 bool autodetected) { }
285 290
286 // Notification that the inspect element window has been opened 291 // Notification that the inspect element window has been opened
287 virtual void InspectElementReply(int num_resources) { } 292 virtual void InspectElementReply(int num_resources) { }
288 293
289 // Notification that the render view has calculated the number of printed 294 // Notification that the render view has calculated the number of printed
290 // pages. 295 // pages.
291 virtual void DidGetPrintedPagesCount(int cookie, int number_pages) { 296 virtual void DidGetPrintedPagesCount(int cookie, int number_pages) {
292 NOTREACHED(); 297 NOTREACHED();
293 } 298 }
294 299
295 // Notification that the render view is done rendering one printed page. This 300 // Notification that the render view is done rendering one printed page. This
296 // call is synchronous, the renderer is waiting on us because of the EMF 301 // call is synchronous, the renderer is waiting on us because of the EMF
297 // memory mapped data. 302 // memory mapped data.
298 virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params) { 303 virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params) {
299 NOTREACHED(); 304 NOTREACHED();
300 } 305 }
301 306
302 // Callback to inform the browser that the renderer did not process the
303 // specified events. This gives an opportunity to the browser to process the
304 // event (used for keyboard shortcuts).
305 virtual void HandleKeyboardEvent(const WebKeyboardEvent& event) { }
306
307 // |url| is assigned to a server that can provide alternate error pages. If 307 // |url| is assigned to a server that can provide alternate error pages. If
308 // unchanged, just use the error pages built into our webkit. 308 // unchanged, just use the error pages built into our webkit.
309 virtual GURL GetAlternateErrorPageURL() const { 309 virtual GURL GetAlternateErrorPageURL() const {
310 return GURL(); 310 return GURL();
311 } 311 }
312 312
313 // Returns a WebPreferences object that will be used by the renderer 313 // Returns a WebPreferences object that will be used by the renderer
314 // associated with the owning render view host. 314 // associated with the owning render view host.
315 virtual WebPreferences GetWebkitPrefs() { 315 virtual WebPreferences GetWebkitPrefs() {
316 NOTREACHED(); 316 NOTREACHED();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 const webkit_glue::WebApplicationInfo& app_info) { } 361 const webkit_glue::WebApplicationInfo& app_info) { }
362 362
363 // Notification the user has pressed enter or space while focus was on the 363 // Notification the user has pressed enter or space while focus was on the
364 // page. This is used to avoid uninitiated user downloads (aka carpet 364 // page. This is used to avoid uninitiated user downloads (aka carpet
365 // bombing), see DownloadRequestManager for details. 365 // bombing), see DownloadRequestManager for details.
366 virtual void OnEnterOrSpace() { } 366 virtual void OnEnterOrSpace() { }
367 }; 367 };
368 368
369 #endif // CHROME_BROWSER_RENDER_VIEW_HOST_DELEGATE_H__ 369 #endif // CHROME_BROWSER_RENDER_VIEW_HOST_DELEGATE_H__
370 370
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698