OLD | NEW |
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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/gfx/rect.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "net/base/load_states.h" | 15 #include "net/base/load_states.h" |
15 #include "webkit/glue/password_form.h" | 16 #include "webkit/glue/password_form.h" |
16 #include "webkit/glue/webpreferences.h" | 17 #include "webkit/glue/webpreferences.h" |
17 #include "webkit/glue/window_open_disposition.h" | 18 #include "webkit/glue/window_open_disposition.h" |
18 | 19 |
19 class AutofillForm; | 20 class AutofillForm; |
20 class NavigationEntry; | 21 class NavigationEntry; |
21 class Profile; | 22 class Profile; |
22 class RenderProcessHost; | 23 class RenderProcessHost; |
23 class RenderViewHost; | 24 class RenderViewHost; |
24 class SkBitmap; | 25 class SkBitmap; |
25 class WebContents; | 26 class WebContents; |
26 class WebKeyboardEvent; | 27 class WebKeyboardEvent; |
27 struct ThumbnailScore; | 28 struct ThumbnailScore; |
28 struct ContextMenuParams; | 29 struct ContextMenuParams; |
29 struct ViewHostMsg_DidPrintPage_Params; | 30 struct ViewHostMsg_DidPrintPage_Params; |
30 struct ViewHostMsg_FrameNavigate_Params; | 31 struct ViewHostMsg_FrameNavigate_Params; |
31 struct WebDropData; | 32 struct WebDropData; |
32 | 33 |
33 namespace base { | 34 namespace base { |
34 class WaitableEvent; | 35 class WaitableEvent; |
35 } | 36 } |
36 | 37 |
37 namespace IPC { | 38 namespace IPC { |
38 class Message; | 39 class Message; |
39 } | 40 } |
40 | 41 |
41 namespace gfx { | |
42 class Rect; | |
43 } | |
44 | |
45 namespace webkit_glue { | 42 namespace webkit_glue { |
46 struct WebApplicationInfo; | 43 struct WebApplicationInfo; |
47 } | 44 } |
48 | 45 |
49 // | 46 // |
50 // RenderViewHostDelegate | 47 // RenderViewHostDelegate |
51 // | 48 // |
52 // An interface implemented by an object interested in knowing about the state | 49 // An interface implemented by an object interested in knowing about the state |
53 // of the RenderViewHost. | 50 // of the RenderViewHost. |
54 // | 51 // |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | 291 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, |
295 const std::string& json_arguments, | 292 const std::string& json_arguments, |
296 IPC::Message* reply_msg) { } | 293 IPC::Message* reply_msg) { } |
297 | 294 |
298 // Password forms have been detected in the page. | 295 // Password forms have been detected in the page. |
299 virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms) { } | 296 virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms) { } |
300 | 297 |
301 // Forms fillable by autofill have been detected in the page. | 298 // Forms fillable by autofill have been detected in the page. |
302 virtual void AutofillFormSubmitted(const AutofillForm& form) { } | 299 virtual void AutofillFormSubmitted(const AutofillForm& form) { } |
303 | 300 |
304 // Called to retrieve a list of suggestions from the web database given | 301 // Called to retrieve a list of suggestions from the web database given |
305 // the name of the field |field_name| and what the user has already typed in | 302 // the name of the field |field_name| and what the user has already typed in |
306 // the field |user_text|. Appeals to the database thead to perform the query. | 303 // the field |user_text|. Appeals to the database thead to perform the query. |
307 // When the database thread is finished, the autofill manager retrieves the | 304 // When the database thread is finished, the autofill manager retrieves the |
308 // calling RenderViewHost and then passes the vector of suggestions to | 305 // calling RenderViewHost and then passes the vector of suggestions to |
309 // RenderViewHost::AutofillSuggestionsReturned. | 306 // RenderViewHost::AutofillSuggestionsReturned. |
310 virtual void GetAutofillSuggestions(const std::wstring& field_name, | 307 virtual void GetAutofillSuggestions(const std::wstring& field_name, |
311 const std::wstring& user_text, | 308 const std::wstring& user_text, |
312 int64 node_id, | 309 int64 node_id, |
313 int request_id) { } | 310 int request_id) { } |
314 | 311 |
315 // Notification that the page has an OpenSearch description document. | 312 // Notification that the page has an OpenSearch description document. |
316 virtual void PageHasOSDD(RenderViewHost* render_view_host, | 313 virtual void PageHasOSDD(RenderViewHost* render_view_host, |
317 int32 page_id, const GURL& doc_url, | 314 int32 page_id, const GURL& doc_url, |
318 bool autodetected) { } | 315 bool autodetected) { } |
319 | 316 |
320 // Notification that the inspect element window has been opened | 317 // Notification that the inspect element window has been opened |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 // request is received. The ResourceDispatcherHost will pause the response | 362 // request is received. The ResourceDispatcherHost will pause the response |
366 // until the onunload handler of the previous renderer is run. | 363 // until the onunload handler of the previous renderer is run. |
367 virtual void OnCrossSiteResponse(int new_render_process_host_id, | 364 virtual void OnCrossSiteResponse(int new_render_process_host_id, |
368 int new_request_id) { } | 365 int new_request_id) { } |
369 | 366 |
370 // Whether this object can be blurred through a javascript | 367 // Whether this object can be blurred through a javascript |
371 // obj.blur() call. ConstrainedWindows shouldn't be able to be | 368 // obj.blur() call. ConstrainedWindows shouldn't be able to be |
372 // blurred. | 369 // blurred. |
373 virtual bool CanBlur() const { return true; } | 370 virtual bool CanBlur() const { return true; } |
374 | 371 |
| 372 // Return the rect where to display the resize corner, if any, otherwise |
| 373 // an empty rect. |
| 374 virtual gfx::Rect GetRootWindowResizerRect() const { return gfx::Rect(); } |
| 375 |
375 // Notification that the renderer has become unresponsive. The | 376 // Notification that the renderer has become unresponsive. The |
376 // delegate can use this notification to show a warning to the user. | 377 // delegate can use this notification to show a warning to the user. |
377 virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 378 virtual void RendererUnresponsive(RenderViewHost* render_view_host, |
378 bool is_during_unload) { } | 379 bool is_during_unload) { } |
379 | 380 |
380 // Notification that a previously unresponsive renderer has become | 381 // Notification that a previously unresponsive renderer has become |
381 // responsive again. The delegate can use this notification to end the | 382 // responsive again. The delegate can use this notification to end the |
382 // warning shown to the user. | 383 // warning shown to the user. |
383 virtual void RendererResponsive(RenderViewHost* render_view_host) { } | 384 virtual void RendererResponsive(RenderViewHost* render_view_host) { } |
384 | 385 |
385 // Notification that the RenderViewHost's load state changed. | 386 // Notification that the RenderViewHost's load state changed. |
386 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state) { } | 387 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state) { } |
387 | 388 |
388 // Notification that a request for install info has completed. | 389 // Notification that a request for install info has completed. |
389 virtual void OnDidGetApplicationInfo( | 390 virtual void OnDidGetApplicationInfo( |
390 int32 page_id, | 391 int32 page_id, |
391 const webkit_glue::WebApplicationInfo& app_info) { } | 392 const webkit_glue::WebApplicationInfo& app_info) { } |
392 | 393 |
393 // Notification the user has pressed enter or space while focus was on the | 394 // Notification the user has pressed enter or space while focus was on the |
394 // page. This is used to avoid uninitiated user downloads (aka carpet | 395 // page. This is used to avoid uninitiated user downloads (aka carpet |
395 // bombing), see DownloadRequestManager for details. | 396 // bombing), see DownloadRequestManager for details. |
396 virtual void OnEnterOrSpace() { } | 397 virtual void OnEnterOrSpace() { } |
397 | 398 |
398 // If this view can be terminated without any side effects | 399 // If this view can be terminated without any side effects |
399 virtual bool CanTerminate() const { return true; } | 400 virtual bool CanTerminate() const { return true; } |
400 }; | 401 }; |
401 | 402 |
402 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 403 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
403 | 404 |
OLD | NEW |