| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 uint64 upload_position, | 408 uint64 upload_position, |
| 409 uint64 upload_size); | 409 uint64 upload_size); |
| 410 | 410 |
| 411 bool SuddenTerminationAllowed() const; | 411 bool SuddenTerminationAllowed() const; |
| 412 void set_sudden_termination_allowed(bool enabled) { | 412 void set_sudden_termination_allowed(bool enabled) { |
| 413 sudden_termination_allowed_ = enabled; | 413 sudden_termination_allowed_ = enabled; |
| 414 } | 414 } |
| 415 | 415 |
| 416 // RenderWidgetHost public overrides. | 416 // RenderWidgetHost public overrides. |
| 417 virtual void Init() OVERRIDE; | 417 virtual void Init() OVERRIDE; |
| 418 virtual void Shutdown() OVERRIDE; |
| 418 virtual bool IsRenderView() const OVERRIDE; | 419 virtual bool IsRenderView() const OVERRIDE; |
| 419 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 420 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 420 virtual void GotFocus() OVERRIDE; | 421 virtual void GotFocus() OVERRIDE; |
| 421 virtual void LostCapture() OVERRIDE; | 422 virtual void LostCapture() OVERRIDE; |
| 422 virtual void LostMouseLock() OVERRIDE; | 423 virtual void LostMouseLock() OVERRIDE; |
| 423 virtual void ForwardMouseEvent( | 424 virtual void ForwardMouseEvent( |
| 424 const blink::WebMouseEvent& mouse_event) OVERRIDE; | 425 const blink::WebMouseEvent& mouse_event) OVERRIDE; |
| 425 virtual void OnPointerEventActivate() OVERRIDE; | 426 virtual void OnPointerEventActivate() OVERRIDE; |
| 426 virtual void ForwardKeyboardEvent( | 427 virtual void ForwardKeyboardEvent( |
| 427 const NativeWebKeyboardEvent& key_event) OVERRIDE; | 428 const NativeWebKeyboardEvent& key_event) OVERRIDE; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 virtual void OnFocus() OVERRIDE; | 543 virtual void OnFocus() OVERRIDE; |
| 543 virtual void OnBlur() OVERRIDE; | 544 virtual void OnBlur() OVERRIDE; |
| 544 | 545 |
| 545 // IPC message handlers. | 546 // IPC message handlers. |
| 546 void OnShowView(int route_id, | 547 void OnShowView(int route_id, |
| 547 WindowOpenDisposition disposition, | 548 WindowOpenDisposition disposition, |
| 548 const gfx::Rect& initial_pos, | 549 const gfx::Rect& initial_pos, |
| 549 bool user_gesture); | 550 bool user_gesture); |
| 550 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); | 551 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); |
| 551 void OnShowFullscreenWidget(int route_id); | 552 void OnShowFullscreenWidget(int route_id); |
| 553 void OnRunModal(int opener_id, IPC::Message* reply_msg); |
| 552 void OnRenderViewReady(); | 554 void OnRenderViewReady(); |
| 553 void OnRenderProcessGone(int status, int error_code); | 555 void OnRenderProcessGone(int status, int error_code); |
| 554 void OnNavigate(const IPC::Message& msg); | 556 void OnNavigate(const IPC::Message& msg); |
| 555 void OnUpdateState(int32 page_id, const PageState& state); | 557 void OnUpdateState(int32 page_id, const PageState& state); |
| 556 void OnUpdateTitle(int32 page_id, | 558 void OnUpdateTitle(int32 page_id, |
| 557 const base::string16& title, | 559 const base::string16& title, |
| 558 blink::WebTextDirection title_direction); | 560 blink::WebTextDirection title_direction); |
| 559 void OnUpdateEncoding(const std::string& encoding); | 561 void OnUpdateEncoding(const std::string& encoding); |
| 560 void OnUpdateTargetURL(int32 page_id, const GURL& url); | 562 void OnUpdateTargetURL(int32 page_id, const GURL& url); |
| 561 void OnClose(); | 563 void OnClose(); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 // first commit. | 686 // first commit. |
| 685 bool has_accessed_initial_document_; | 687 bool has_accessed_initial_document_; |
| 686 | 688 |
| 687 // The current state of this RVH. | 689 // The current state of this RVH. |
| 688 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 690 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
| 689 RenderViewHostImplState rvh_state_; | 691 RenderViewHostImplState rvh_state_; |
| 690 | 692 |
| 691 // Routing ID for the main frame's RenderFrameHost. | 693 // Routing ID for the main frame's RenderFrameHost. |
| 692 int main_frame_routing_id_; | 694 int main_frame_routing_id_; |
| 693 | 695 |
| 696 // If we were asked to RunModal, then this will hold the reply_msg that we |
| 697 // must return to the renderer to unblock it. |
| 698 IPC::Message* run_modal_reply_msg_; |
| 699 // This will hold the routing id of the RenderView that opened us. |
| 700 int run_modal_opener_id_; |
| 701 |
| 694 // Set to true when there is a pending ViewMsg_ShouldClose message. This | 702 // Set to true when there is a pending ViewMsg_ShouldClose message. This |
| 695 // ensures we don't spam the renderer with multiple beforeunload requests. | 703 // ensures we don't spam the renderer with multiple beforeunload requests. |
| 696 // When either this value or IsWaitingForUnloadACK is true, the value of | 704 // When either this value or IsWaitingForUnloadACK is true, the value of |
| 697 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a | 705 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a |
| 698 // cross-site transition or a tab close attempt. | 706 // cross-site transition or a tab close attempt. |
| 699 // TODO(clamy): Remove this boolean and add one more state to the state | 707 // TODO(clamy): Remove this boolean and add one more state to the state |
| 700 // machine. | 708 // machine. |
| 701 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 709 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
| 702 bool is_waiting_for_beforeunload_ack_; | 710 bool is_waiting_for_beforeunload_ack_; |
| 703 | 711 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 763 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 756 }; | 764 }; |
| 757 | 765 |
| 758 #if defined(COMPILER_MSVC) | 766 #if defined(COMPILER_MSVC) |
| 759 #pragma warning(pop) | 767 #pragma warning(pop) |
| 760 #endif | 768 #endif |
| 761 | 769 |
| 762 } // namespace content | 770 } // namespace content |
| 763 | 771 |
| 764 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 772 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |