OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 25 matching lines...) Expand all Loading... |
36 class ViewMsg_Navigate; | 36 class ViewMsg_Navigate; |
37 struct ContextMenuParams; | 37 struct ContextMenuParams; |
38 struct MediaPlayerAction; | 38 struct MediaPlayerAction; |
39 struct ViewHostMsg_AccessibilityNotification_Params; | 39 struct ViewHostMsg_AccessibilityNotification_Params; |
40 struct ViewHostMsg_CreateWindow_Params; | 40 struct ViewHostMsg_CreateWindow_Params; |
41 struct ViewHostMsg_ShowPopup_Params; | 41 struct ViewHostMsg_ShowPopup_Params; |
42 struct ViewMsg_Navigate_Params; | 42 struct ViewMsg_Navigate_Params; |
43 struct WebDropData; | 43 struct WebDropData; |
44 struct UserMetricsAction; | 44 struct UserMetricsAction; |
45 struct ViewHostMsg_RunFileChooser_Params; | 45 struct ViewHostMsg_RunFileChooser_Params; |
| 46 struct ViewMsg_StopFinding_Params; |
46 | 47 |
47 namespace base { | 48 namespace base { |
48 class ListValue; | 49 class ListValue; |
49 } | 50 } |
50 | 51 |
51 namespace gfx { | 52 namespace gfx { |
52 class Point; | 53 class Point; |
53 } // namespace gfx | 54 } // namespace gfx |
54 | 55 |
55 namespace ui { | 56 namespace ui { |
56 class Range; | 57 class Range; |
57 } // namespace ui | 58 } // namespace ui |
58 | 59 |
59 namespace webkit_glue { | 60 namespace webkit_glue { |
60 struct WebAccessibility; | 61 struct WebAccessibility; |
| 62 struct CustomContextMenuContext; |
61 } // namespace webkit_glue | 63 } // namespace webkit_glue |
62 | 64 |
63 namespace WebKit { | 65 namespace WebKit { |
64 struct WebMediaPlayerAction; | 66 struct WebMediaPlayerAction; |
65 struct WebFindOptions; | 67 struct WebFindOptions; |
66 } // namespace WebKit | 68 } // namespace WebKit |
67 | 69 |
68 namespace net { | 70 namespace net { |
69 class URLRequestContextGetter; | 71 class URLRequestContextGetter; |
70 } | 72 } |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 void LoadStateChanged(const GURL& url, | 317 void LoadStateChanged(const GURL& url, |
316 const net::LoadStateWithParam& load_state, | 318 const net::LoadStateWithParam& load_state, |
317 uint64 upload_position, | 319 uint64 upload_position, |
318 uint64 upload_size); | 320 uint64 upload_size); |
319 | 321 |
320 bool SuddenTerminationAllowed() const; | 322 bool SuddenTerminationAllowed() const; |
321 void set_sudden_termination_allowed(bool enabled) { | 323 void set_sudden_termination_allowed(bool enabled) { |
322 sudden_termination_allowed_ = enabled; | 324 sudden_termination_allowed_ = enabled; |
323 } | 325 } |
324 | 326 |
325 // Message the renderer that we should be counted as a new document and not | |
326 // as a popup. | |
327 void DisassociateFromPopupCount(); | |
328 | |
329 // RenderWidgetHost public overrides. | 327 // RenderWidgetHost public overrides. |
330 virtual void Shutdown(); | 328 virtual void Shutdown(); |
331 virtual bool IsRenderView() const; | 329 virtual bool IsRenderView() const; |
332 virtual bool OnMessageReceived(const IPC::Message& msg); | 330 virtual bool OnMessageReceived(const IPC::Message& msg); |
333 virtual void GotFocus(); | 331 virtual void GotFocus(); |
334 virtual void LostCapture(); | 332 virtual void LostCapture(); |
335 virtual void ForwardMouseEvent(const WebKit::WebMouseEvent& mouse_event); | 333 virtual void ForwardMouseEvent(const WebKit::WebMouseEvent& mouse_event); |
336 virtual void OnMouseActivate(); | 334 virtual void OnMouseActivate(); |
337 virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event); | 335 virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event); |
338 | 336 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 // into that frame's document. | 402 // into that frame's document. |
405 void InsertCSS(const string16& frame_xpath, const std::string& css); | 403 void InsertCSS(const string16& frame_xpath, const std::string& css); |
406 | 404 |
407 // Tells the renderer not to add scrollbars with height and width below a | 405 // Tells the renderer not to add scrollbars with height and width below a |
408 // threshold. | 406 // threshold. |
409 void DisableScrollbarsForThreshold(const gfx::Size& size); | 407 void DisableScrollbarsForThreshold(const gfx::Size& size); |
410 | 408 |
411 // Instructs the RenderView to send back updates to the preferred size. | 409 // Instructs the RenderView to send back updates to the preferred size. |
412 void EnablePreferredSizeMode(int flags); | 410 void EnablePreferredSizeMode(int flags); |
413 | 411 |
| 412 // Executes custom context menu action that was provided from WebKit. |
| 413 void ExecuteCustomContextMenuCommand( |
| 414 int action, const webkit_glue::CustomContextMenuContext& context); |
| 415 |
| 416 // Let the renderer know that the menu has been closed. |
| 417 void NotifyContextMenuClosed( |
| 418 const webkit_glue::CustomContextMenuContext& context); |
| 419 |
| 420 // Copies the image at location x, y to the clipboard (if there indeed is an |
| 421 // image at that location). |
| 422 void CopyImageAt(int x, int y); |
| 423 |
| 424 // Tells the renderer to perform the given action on the media player |
| 425 // located at the given point. |
| 426 void ExecuteMediaPlayerActionAtLocation( |
| 427 const gfx::Point& location, const WebKit::WebMediaPlayerAction& action); |
| 428 |
| 429 // Sent to the renderer when a popup window should no longer count against |
| 430 // the current popup count (either because it's not a popup or because it was |
| 431 // a generated by a user action or because a constrained popup got turned |
| 432 // into a full window). |
| 433 void DisassociateFromPopupCount(); |
| 434 |
| 435 // Notification that a move or resize renderer's containing window has |
| 436 // started. |
| 437 void NotifyMoveOrResizeStarted(); |
| 438 |
| 439 // Notifies the renderer that the user has closed the FindInPage window |
| 440 // (and what action to take regarding the selection). |
| 441 void StopFinding(const ViewMsg_StopFinding_Params& params); |
| 442 |
414 // NOTE: Do not add functions that just send an IPC message that are called in | 443 // NOTE: Do not add functions that just send an IPC message that are called in |
415 // one or two places. Have the caller send the IPC message directly. | 444 // one or two places. Have the caller send the IPC message directly. |
416 | 445 |
417 protected: | 446 protected: |
418 friend class RenderViewHostObserver; | 447 friend class RenderViewHostObserver; |
419 | 448 |
420 // Add and remove observers for filtering IPC messages. Clients must be sure | 449 // Add and remove observers for filtering IPC messages. Clients must be sure |
421 // to remove the observer before they go away. | 450 // to remove the observer before they go away. |
422 void AddObserver(RenderViewHostObserver* observer); | 451 void AddObserver(RenderViewHostObserver* observer); |
423 void RemoveObserver(RenderViewHostObserver* observer); | 452 void RemoveObserver(RenderViewHostObserver* observer); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 // The termination status of the last render view that terminated. | 620 // The termination status of the last render view that terminated. |
592 base::TerminationStatus render_view_termination_status_; | 621 base::TerminationStatus render_view_termination_status_; |
593 | 622 |
594 // A list of observers that filter messages. Weak references. | 623 // A list of observers that filter messages. Weak references. |
595 ObserverList<RenderViewHostObserver> observers_; | 624 ObserverList<RenderViewHostObserver> observers_; |
596 | 625 |
597 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 626 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
598 }; | 627 }; |
599 | 628 |
600 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 629 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |