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