OLD | NEW |
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 CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 uint64 upload_position, | 387 uint64 upload_position, |
388 uint64 upload_size); | 388 uint64 upload_size); |
389 | 389 |
390 bool SuddenTerminationAllowed() const; | 390 bool SuddenTerminationAllowed() const; |
391 void set_sudden_termination_allowed(bool enabled) { | 391 void set_sudden_termination_allowed(bool enabled) { |
392 sudden_termination_allowed_ = enabled; | 392 sudden_termination_allowed_ = enabled; |
393 } | 393 } |
394 | 394 |
395 // RenderWidgetHost public overrides. | 395 // RenderWidgetHost public overrides. |
396 virtual void Init() OVERRIDE; | 396 virtual void Init() OVERRIDE; |
| 397 virtual void Shutdown() OVERRIDE; |
397 virtual bool IsRenderView() const OVERRIDE; | 398 virtual bool IsRenderView() const OVERRIDE; |
398 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 399 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
399 virtual void GotFocus() OVERRIDE; | 400 virtual void GotFocus() OVERRIDE; |
400 virtual void LostCapture() OVERRIDE; | 401 virtual void LostCapture() OVERRIDE; |
401 virtual void LostMouseLock() OVERRIDE; | 402 virtual void LostMouseLock() OVERRIDE; |
402 virtual void ForwardMouseEvent( | 403 virtual void ForwardMouseEvent( |
403 const blink::WebMouseEvent& mouse_event) OVERRIDE; | 404 const blink::WebMouseEvent& mouse_event) OVERRIDE; |
404 virtual void OnPointerEventActivate() OVERRIDE; | 405 virtual void OnPointerEventActivate() OVERRIDE; |
405 virtual void ForwardKeyboardEvent( | 406 virtual void ForwardKeyboardEvent( |
406 const NativeWebKeyboardEvent& key_event) OVERRIDE; | 407 const NativeWebKeyboardEvent& key_event) OVERRIDE; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 virtual void OnFocus() OVERRIDE; | 513 virtual void OnFocus() OVERRIDE; |
513 virtual void OnBlur() OVERRIDE; | 514 virtual void OnBlur() OVERRIDE; |
514 | 515 |
515 // IPC message handlers. | 516 // IPC message handlers. |
516 void OnShowView(int route_id, | 517 void OnShowView(int route_id, |
517 WindowOpenDisposition disposition, | 518 WindowOpenDisposition disposition, |
518 const gfx::Rect& initial_pos, | 519 const gfx::Rect& initial_pos, |
519 bool user_gesture); | 520 bool user_gesture); |
520 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); | 521 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); |
521 void OnShowFullscreenWidget(int route_id); | 522 void OnShowFullscreenWidget(int route_id); |
| 523 void OnRunModal(int opener_id, IPC::Message* reply_msg); |
522 void OnRenderViewReady(); | 524 void OnRenderViewReady(); |
523 void OnRenderProcessGone(int status, int error_code); | 525 void OnRenderProcessGone(int status, int error_code); |
524 void OnUpdateState(int32 page_id, const PageState& state); | 526 void OnUpdateState(int32 page_id, const PageState& state); |
525 void OnUpdateTitle(int32 page_id, | 527 void OnUpdateTitle(int32 page_id, |
526 const base::string16& title, | 528 const base::string16& title, |
527 blink::WebTextDirection title_direction); | 529 blink::WebTextDirection title_direction); |
528 void OnUpdateEncoding(const std::string& encoding); | 530 void OnUpdateEncoding(const std::string& encoding); |
529 void OnUpdateTargetURL(int32 page_id, const GURL& url); | 531 void OnUpdateTargetURL(int32 page_id, const GURL& url); |
530 void OnClose(); | 532 void OnClose(); |
531 void OnRequestMove(const gfx::Rect& pos); | 533 void OnRequestMove(const gfx::Rect& pos); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 // first commit. | 655 // first commit. |
654 bool has_accessed_initial_document_; | 656 bool has_accessed_initial_document_; |
655 | 657 |
656 // The current state of this RVH. | 658 // The current state of this RVH. |
657 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 659 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
658 RenderViewHostImplState rvh_state_; | 660 RenderViewHostImplState rvh_state_; |
659 | 661 |
660 // Routing ID for the main frame's RenderFrameHost. | 662 // Routing ID for the main frame's RenderFrameHost. |
661 int main_frame_routing_id_; | 663 int main_frame_routing_id_; |
662 | 664 |
| 665 // If we were asked to RunModal, then this will hold the reply_msg that we |
| 666 // must return to the renderer to unblock it. |
| 667 IPC::Message* run_modal_reply_msg_; |
| 668 // This will hold the routing id of the RenderView that opened us. |
| 669 int run_modal_opener_id_; |
| 670 |
663 // Set to true when there is a pending ViewMsg_ShouldClose message. This | 671 // Set to true when there is a pending ViewMsg_ShouldClose message. This |
664 // ensures we don't spam the renderer with multiple beforeunload requests. | 672 // ensures we don't spam the renderer with multiple beforeunload requests. |
665 // When either this value or IsWaitingForUnloadACK is true, the value of | 673 // When either this value or IsWaitingForUnloadACK is true, the value of |
666 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a | 674 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a |
667 // cross-site transition or a tab close attempt. | 675 // cross-site transition or a tab close attempt. |
668 // TODO(clamy): Remove this boolean and add one more state to the state | 676 // TODO(clamy): Remove this boolean and add one more state to the state |
669 // machine. | 677 // machine. |
670 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 678 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
671 bool is_waiting_for_beforeunload_ack_; | 679 bool is_waiting_for_beforeunload_ack_; |
672 | 680 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 728 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
721 }; | 729 }; |
722 | 730 |
723 #if defined(COMPILER_MSVC) | 731 #if defined(COMPILER_MSVC) |
724 #pragma warning(pop) | 732 #pragma warning(pop) |
725 #endif | 733 #endif |
726 | 734 |
727 } // namespace content | 735 } // namespace content |
728 | 736 |
729 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 737 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |