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> |
11 | 11 |
12 #include "base/callback.h" | |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/process/kill.h" | 16 #include "base/process/kill.h" |
16 #include "content/browser/renderer_host/render_widget_host_impl.h" | 17 #include "content/browser/renderer_host/render_widget_host_impl.h" |
17 #include "content/browser/site_instance_impl.h" | 18 #include "content/browser/site_instance_impl.h" |
18 #include "content/common/drag_event_source_info.h" | 19 #include "content/common/drag_event_source_info.h" |
19 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/render_view_host.h" | 21 #include "content/public/browser/render_view_host.h" |
21 #include "content/public/common/javascript_message_type.h" | 22 #include "content/public/common/javascript_message_type.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 | 58 |
58 namespace content { | 59 namespace content { |
59 | 60 |
60 class BrowserMediaPlayerManager; | 61 class BrowserMediaPlayerManager; |
61 class ChildProcessSecurityPolicyImpl; | 62 class ChildProcessSecurityPolicyImpl; |
62 class PageState; | 63 class PageState; |
63 class RenderWidgetHostDelegate; | 64 class RenderWidgetHostDelegate; |
64 class SessionStorageNamespace; | 65 class SessionStorageNamespace; |
65 class SessionStorageNamespaceImpl; | 66 class SessionStorageNamespaceImpl; |
66 class TestRenderViewHost; | 67 class TestRenderViewHost; |
68 class TimeoutMonitor; | |
67 struct ContextMenuParams; | 69 struct ContextMenuParams; |
68 struct FileChooserParams; | 70 struct FileChooserParams; |
69 struct Referrer; | 71 struct Referrer; |
70 struct ShowDesktopNotificationHostMsgParams; | 72 struct ShowDesktopNotificationHostMsgParams; |
71 | 73 |
72 #if defined(COMPILER_MSVC) | 74 #if defined(COMPILER_MSVC) |
73 // RenderViewHostImpl is the bottom of a diamond-shaped hierarchy, | 75 // RenderViewHostImpl is the bottom of a diamond-shaped hierarchy, |
74 // with RenderWidgetHost at the root. VS warns when methods from the | 76 // with RenderWidgetHost at the root. VS warns when methods from the |
75 // root are overridden in only one of the base classes and not both | 77 // root are overridden in only one of the base classes and not both |
76 // (in this case, RenderWidgetHostImpl provides implementations of | 78 // (in this case, RenderWidgetHostImpl provides implementations of |
(...skipping 15 matching lines...) Expand all Loading... | |
92 // | 94 // |
93 // Right now, the concept of page navigation (both top level and frame) exists | 95 // Right now, the concept of page navigation (both top level and frame) exists |
94 // in the WebContentsImpl still, so if you instantiate one of these elsewhere, | 96 // in the WebContentsImpl still, so if you instantiate one of these elsewhere, |
95 // you will not be able to traverse pages back and forward. We need to determine | 97 // you will not be able to traverse pages back and forward. We need to determine |
96 // if we want to bring that and other functionality down into this object so it | 98 // if we want to bring that and other functionality down into this object so it |
97 // can be shared by others. | 99 // can be shared by others. |
98 class CONTENT_EXPORT RenderViewHostImpl | 100 class CONTENT_EXPORT RenderViewHostImpl |
99 : public RenderViewHost, | 101 : public RenderViewHost, |
100 public RenderWidgetHostImpl { | 102 public RenderWidgetHostImpl { |
101 public: | 103 public: |
104 // Keeps track of the state of the RenderViewHostImpl, more particularly | |
105 // during swap out. | |
106 enum RenderViewHostImplState { | |
107 // The standard state for a RVH handling the communication with a | |
108 // RenderView. | |
109 STATE_LIVE = 0, | |
110 // The RVH has sent the SwapOut request to the renderer, but has not | |
111 // received the SwapOutACK yet. The new page has not been committed yet | |
112 // either. | |
113 STATE_WAITING_FOR_UNLOAD_ACK, | |
114 // The RVH received the SwapOutACK from the RenderView, but the new page has | |
115 // not been committed yet. | |
116 STATE_WAITING_FOR_COMMIT, | |
117 // The RVH is waiting for the CloseACK from the RenderView. | |
118 STATE_WAITING_FOR_CLOSE, | |
119 // The RVH has not received the SwapOutACK yet, but the new page has | |
120 // committed. The number of active views of the RVH SiteInstanceImpl is not | |
121 // zero. Upon reeception of the SwapOutACK, the RVH will be swapped out. | |
nasko
2014/01/27 19:09:51
nit: "reeception" < extra 'e'?
clamy
2014/01/28 12:27:21
Done.
| |
122 STATE_PENDING_SWAP_OUT, | |
123 // The RVH has not received the SwapOutACK yet, but the new page has | |
124 // committed. The number of active views of the RVH SiteInstanceImpl is | |
125 // zero. Upon reeception of the SwapOutACK, the RVH will be shutdown. | |
nasko
2014/01/27 19:09:51
nit: same as above, extra 'e'
clamy
2014/01/28 12:27:21
Done.
| |
126 STATE_PENDING_SHUTDOWN, | |
127 // The RVH is swapped out, it is being used as a placeholder to allow for | |
128 // cross-process communication. | |
129 STATE_SWAPPED_OUT, | |
130 }; | |
131 // Helper function to determine whether the RVH state should contribute to the | |
132 // number of active views of a SiteInstance or not. | |
133 static bool IsRVHStateActive(RenderViewHostImplState rvh_state); | |
134 | |
102 // Convenience function, just like RenderViewHost::FromID. | 135 // Convenience function, just like RenderViewHost::FromID. |
103 static RenderViewHostImpl* FromID(int render_process_id, int render_view_id); | 136 static RenderViewHostImpl* FromID(int render_process_id, int render_view_id); |
104 | 137 |
105 // |routing_id| could be a valid route id, or it could be MSG_ROUTING_NONE, in | 138 // |routing_id| could be a valid route id, or it could be MSG_ROUTING_NONE, in |
106 // which case RenderWidgetHost will create a new one. |swapped_out| indicates | 139 // which case RenderWidgetHost will create a new one. |swapped_out| indicates |
107 // whether the view should initially be swapped out (e.g., for an opener | 140 // whether the view should initially be swapped out (e.g., for an opener |
108 // frame being rendered by another process). |hidden| indicates whether the | 141 // frame being rendered by another process). |hidden| indicates whether the |
109 // view is initially hidden or visible. | 142 // view is initially hidden or visible. |
110 // | 143 // |
111 // The |session_storage_namespace| parameter allows multiple render views and | 144 // The |session_storage_namespace| parameter allows multiple render views and |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
275 // RenderViewHost. | 308 // RenderViewHost. |
276 void CancelSuspendedNavigations(); | 309 void CancelSuspendedNavigations(); |
277 | 310 |
278 // Whether the initial empty page of this view has been accessed by another | 311 // Whether the initial empty page of this view has been accessed by another |
279 // page, making it unsafe to show the pending URL. Always false after the | 312 // page, making it unsafe to show the pending URL. Always false after the |
280 // first commit. | 313 // first commit. |
281 bool has_accessed_initial_document() { | 314 bool has_accessed_initial_document() { |
282 return has_accessed_initial_document_; | 315 return has_accessed_initial_document_; |
283 } | 316 } |
284 | 317 |
285 // Whether this RenderViewHost has been swapped out to be displayed by a | 318 // The current state of this RVH. |
286 // different process. | 319 RenderViewHostImplState rvh_state() const { return rvh_state_; } |
287 bool is_swapped_out() const { return is_swapped_out_; } | |
288 | 320 |
289 // Called on the pending RenderViewHost when the network response is ready to | 321 // Called on the pending RenderViewHost when the network response is ready to |
290 // commit. We should ensure that the old RenderViewHost runs its unload | 322 // commit. We should ensure that the old RenderViewHost runs its unload |
291 // handler and determine whether a transfer to a different RenderViewHost is | 323 // handler and determine whether a transfer to a different RenderViewHost is |
292 // needed. | 324 // needed. |
293 void OnCrossSiteResponse( | 325 void OnCrossSiteResponse( |
294 const GlobalRequestID& global_request_id, | 326 const GlobalRequestID& global_request_id, |
295 bool is_transfer, | 327 bool is_transfer, |
296 const std::vector<GURL>& transfer_url_chain, | 328 const std::vector<GURL>& transfer_url_chain, |
297 const Referrer& referrer, | 329 const Referrer& referrer, |
(...skipping 12 matching lines...) Expand all Loading... | |
310 // a blank document. The renderer should preserve the Frame object until it | 342 // a blank document. The renderer should preserve the Frame object until it |
311 // exits, in case we come back. The renderer can exit if it has no other | 343 // exits, in case we come back. The renderer can exit if it has no other |
312 // active RenderViews, but not until WasSwappedOut is called (when it is no | 344 // active RenderViews, but not until WasSwappedOut is called (when it is no |
313 // longer visible). | 345 // longer visible). |
314 void SwapOut(); | 346 void SwapOut(); |
315 | 347 |
316 // Called when either the SwapOut request has been acknowledged or has timed | 348 // Called when either the SwapOut request has been acknowledged or has timed |
317 // out. | 349 // out. |
318 void OnSwappedOut(bool timed_out); | 350 void OnSwappedOut(bool timed_out); |
319 | 351 |
320 // Called to notify the renderer that it has been visibly swapped out and | 352 // Called when the RenderFrameHostManager has swapped in a new |
321 // replaced by another RenderViewHost, after an earlier call to SwapOut. | 353 // RenderFrameHost. Should |this| RVH switch to the pending shutdown state, |
322 // It is now safe for the process to exit if there are no other active | 354 // |pending_delete_on_swap_out| will be executed upon reception of the |
323 // RenderViews. | 355 // SwapOutACK, or when the unload timer times out. |
324 void WasSwappedOut(); | 356 void WasSwappedOut(const base::Closure& pending_delete_on_swap_out); |
357 | |
358 // Set |this| as pending shutdown. |on_swap_out| will be called | |
359 // when the swap out ack is received, or when the unload timer times out. | |
360 void SetPendingShutdown(const base::Closure& on_swap_out); | |
325 | 361 |
326 // Close the page ignoring whether it has unload events registers. | 362 // Close the page ignoring whether it has unload events registers. |
327 // This is called after the beforeunload and unload events have fired | 363 // This is called after the beforeunload and unload events have fired |
328 // and the user has agreed to continue with closing the page. | 364 // and the user has agreed to continue with closing the page. |
329 void ClosePageIgnoringUnloadEvents(); | 365 void ClosePageIgnoringUnloadEvents(); |
330 | 366 |
331 // Returns whether this RenderViewHost has an outstanding cross-site request. | 367 // Returns whether this RenderViewHost has an outstanding cross-site request. |
332 // Cleared when we hear the response and start to swap out the old | 368 // Cleared when we hear the response and start to swap out the old |
333 // RenderViewHost, or if we hear a commit here without a network request. | 369 // RenderViewHost, or if we hear a commit here without a network request. |
334 bool HasPendingCrossSiteRequest(); | 370 bool HasPendingCrossSiteRequest(); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 const base::Closure& callback); | 484 const base::Closure& callback); |
449 void SetAccessibilityLoadCompleteCallbackForTesting( | 485 void SetAccessibilityLoadCompleteCallbackForTesting( |
450 const base::Closure& callback); | 486 const base::Closure& callback); |
451 void SetAccessibilityOtherCallbackForTesting( | 487 void SetAccessibilityOtherCallbackForTesting( |
452 const base::Closure& callback); | 488 const base::Closure& callback); |
453 | 489 |
454 bool is_waiting_for_beforeunload_ack() { | 490 bool is_waiting_for_beforeunload_ack() { |
455 return is_waiting_for_beforeunload_ack_; | 491 return is_waiting_for_beforeunload_ack_; |
456 } | 492 } |
457 | 493 |
458 bool is_waiting_for_unload_ack() { | 494 // Whether the RVH is waiting for the unload ack from the renderer. |
459 return is_waiting_for_unload_ack_; | 495 bool IsWaitingForUnloadACK() const; |
460 } | |
461 | 496 |
462 // Returns whether the given URL is allowed to commit in the current process. | 497 // Returns whether the given URL is allowed to commit in the current process. |
463 // This is a more conservative check than RenderProcessHost::FilterURL, since | 498 // This is a more conservative check than RenderProcessHost::FilterURL, since |
464 // it will be used to kill processes that commit unauthorized URLs. | 499 // it will be used to kill processes that commit unauthorized URLs. |
465 bool CanCommitURL(const GURL& url); | 500 bool CanCommitURL(const GURL& url); |
466 | 501 |
467 // Update the FrameTree to use this RenderViewHost's main frame | 502 // Update the FrameTree to use this RenderViewHost's main frame |
468 // RenderFrameHost. Called when the RenderViewHost is committed. | 503 // RenderFrameHost. Called when the RenderViewHost is committed. |
469 // | 504 // |
470 // TODO(ajwong): Remove once RenderViewHost no longer owns the main frame | 505 // TODO(ajwong): Remove once RenderViewHost no longer owns the main frame |
471 // RenderFrameHost. | 506 // RenderFrameHost. |
472 void AttachToFrameTree(); | 507 void AttachToFrameTree(); |
473 | 508 |
474 // The following IPC handlers are public so RenderFrameHost can call them, | 509 // The following IPC handlers are public so RenderFrameHost can call them, |
475 // while we transition the code to not use RenderViewHost. | 510 // while we transition the code to not use RenderViewHost. |
476 // | 511 // |
477 // TODO(nasko): Remove those methods once we are done moving navigation | 512 // TODO(nasko): Remove those methods once we are done moving navigation |
478 // into RenderFrameHost. | 513 // into RenderFrameHost. |
479 void OnDidStartProvisionalLoadForFrame(int64 frame_id, | 514 void OnDidStartProvisionalLoadForFrame(int64 frame_id, |
480 int64 parent_frame_id, | 515 int64 parent_frame_id, |
481 bool main_frame, | 516 bool main_frame, |
482 const GURL& url); | 517 const GURL& url); |
483 | 518 |
519 // Increases the refcounting on this RVH. This is done by the FrameTree on | |
520 // creation of a RenderFrameHost. | |
521 void increment_ref_count() { ++frames_ref_count_; } | |
522 | |
523 // Decreases the refcounting on this RVH. This is done by the FrameTree on | |
524 // destruction of a RenderFrameHost. | |
525 void decrement_ref_count() { --frames_ref_count_; } | |
526 | |
527 // Returns the refcount on this RVH, that is the number of RenderFrameHosts | |
528 // currently using it. | |
529 int ref_count() { return frames_ref_count_; } | |
530 | |
484 // NOTE: Do not add functions that just send an IPC message that are called in | 531 // NOTE: Do not add functions that just send an IPC message that are called in |
485 // one or two places. Have the caller send the IPC message directly (unless | 532 // one or two places. Have the caller send the IPC message directly (unless |
486 // the caller places are in different platforms, in which case it's better | 533 // the caller places are in different platforms, in which case it's better |
487 // to keep them consistent). | 534 // to keep them consistent). |
488 | 535 |
489 protected: | 536 protected: |
490 // RenderWidgetHost protected overrides. | 537 // RenderWidgetHost protected overrides. |
491 virtual void OnUserGesture() OVERRIDE; | 538 virtual void OnUserGesture() OVERRIDE; |
492 virtual void NotifyRendererUnresponsive() OVERRIDE; | 539 virtual void NotifyRendererUnresponsive() OVERRIDE; |
493 virtual void NotifyRendererResponsive() OVERRIDE; | 540 virtual void NotifyRendererResponsive() OVERRIDE; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
590 | 637 |
591 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 638 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
592 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 639 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
593 #endif | 640 #endif |
594 | 641 |
595 private: | 642 private: |
596 friend class TestRenderViewHost; | 643 friend class TestRenderViewHost; |
597 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); | 644 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); |
598 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); | 645 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); |
599 | 646 |
600 // Sets whether this RenderViewHost is swapped out in favor of another, | 647 // Updates the state of this RenderViewHost and clears any waiting state |
601 // and clears any waiting state that is no longer relevant. | 648 // that is no longer relevant. |
602 void SetSwappedOut(bool is_swapped_out); | 649 void SetState(RenderViewHostImplState rvh_state); |
603 | 650 |
604 bool CanAccessFilesOfPageState(const PageState& state) const; | 651 bool CanAccessFilesOfPageState(const PageState& state) const; |
605 | 652 |
653 // The number of RenderFrameHost which have a reference to this RVH. | |
654 int frames_ref_count_; | |
655 | |
606 // Our delegate, which wants to know about changes in the RenderView. | 656 // Our delegate, which wants to know about changes in the RenderView. |
607 RenderViewHostDelegate* delegate_; | 657 RenderViewHostDelegate* delegate_; |
608 | 658 |
609 // The SiteInstance associated with this RenderViewHost. All pages drawn | 659 // The SiteInstance associated with this RenderViewHost. All pages drawn |
610 // in this RenderViewHost are part of this SiteInstance. Should not change | 660 // in this RenderViewHost are part of this SiteInstance. Should not change |
611 // over time. | 661 // over time. |
612 scoped_refptr<SiteInstanceImpl> instance_; | 662 scoped_refptr<SiteInstanceImpl> instance_; |
613 | 663 |
614 // true if we are currently waiting for a response for drag context | 664 // true if we are currently waiting for a response for drag context |
615 // information. | 665 // information. |
(...skipping 14 matching lines...) Expand all Loading... | |
630 // navigation, because WebContentsImpl will destroy the pending RVH and create | 680 // navigation, because WebContentsImpl will destroy the pending RVH and create |
631 // a new one if a second navigation occurs. | 681 // a new one if a second navigation occurs. |
632 scoped_ptr<ViewMsg_Navigate_Params> suspended_nav_params_; | 682 scoped_ptr<ViewMsg_Navigate_Params> suspended_nav_params_; |
633 | 683 |
634 // Whether the initial empty page of this view has been accessed by another | 684 // Whether the initial empty page of this view has been accessed by another |
635 // page, making it unsafe to show the pending URL. Usually false unless | 685 // page, making it unsafe to show the pending URL. Usually false unless |
636 // another window tries to modify the blank page. Always false after the | 686 // another window tries to modify the blank page. Always false after the |
637 // first commit. | 687 // first commit. |
638 bool has_accessed_initial_document_; | 688 bool has_accessed_initial_document_; |
639 | 689 |
640 // Whether this RenderViewHost is currently swapped out, such that the view is | 690 // The current state of this RVH. |
641 // being rendered by another process. | 691 RenderViewHostImplState rvh_state_; |
642 bool is_swapped_out_; | |
643 | 692 |
644 // The frame id of the main (top level) frame. This value is set on the | 693 // The frame id of the main (top level) frame. This value is set on the |
645 // initial navigation of a RenderView and reset when the RenderView's | 694 // initial navigation of a RenderView and reset when the RenderView's |
646 // process is terminated (in RenderProcessGone). | 695 // process is terminated (in RenderProcessGone). |
647 // TODO(creis): Remove this when we switch to routing IDs for frames. | 696 // TODO(creis): Remove this when we switch to routing IDs for frames. |
648 int64 main_frame_id_; | 697 int64 main_frame_id_; |
649 | 698 |
650 // Routing ID for the main frame's RenderFrameHost. | 699 // Routing ID for the main frame's RenderFrameHost. |
651 int main_frame_routing_id_; | 700 int main_frame_routing_id_; |
652 | 701 |
653 // If we were asked to RunModal, then this will hold the reply_msg that we | 702 // If we were asked to RunModal, then this will hold the reply_msg that we |
654 // must return to the renderer to unblock it. | 703 // must return to the renderer to unblock it. |
655 IPC::Message* run_modal_reply_msg_; | 704 IPC::Message* run_modal_reply_msg_; |
656 // This will hold the routing id of the RenderView that opened us. | 705 // This will hold the routing id of the RenderView that opened us. |
657 int run_modal_opener_id_; | 706 int run_modal_opener_id_; |
658 | 707 |
659 // Set to true when there is a pending ViewMsg_ShouldClose message. This | 708 // Set to true when there is a pending ViewMsg_ShouldClose message. This |
660 // ensures we don't spam the renderer with multiple beforeunload requests. | 709 // ensures we don't spam the renderer with multiple beforeunload requests. |
661 // When either this value or is_waiting_for_unload_ack_ is true, the value of | 710 // When either this value or IsWaitingForUnloadACK is true, the value of |
662 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a | 711 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a |
663 // cross-site transition or a tab close attempt. | 712 // cross-site transition or a tab close attempt. |
664 bool is_waiting_for_beforeunload_ack_; | 713 bool is_waiting_for_beforeunload_ack_; |
665 | 714 |
666 // Set to true when there is a pending ViewMsg_Close message. Also see | |
667 // is_waiting_for_beforeunload_ack_, unload_ack_is_for_cross_site_transition_. | |
668 bool is_waiting_for_unload_ack_; | |
669 | |
670 // Set to true when waiting for ViewHostMsg_SwapOut_ACK has timed out. | |
671 bool has_timed_out_on_unload_; | |
672 | |
673 // Valid only when is_waiting_for_beforeunload_ack_ or | 715 // Valid only when is_waiting_for_beforeunload_ack_ or |
674 // is_waiting_for_unload_ack_ is true. This tells us if the unload request | 716 // IsWaitingForUnloadACK is true. This tells us if the unload request |
675 // is for closing the entire tab ( = false), or only this RenderViewHost in | 717 // is for closing the entire tab ( = false), or only this RenderViewHost in |
676 // the case of a cross-site transition ( = true). | 718 // the case of a cross-site transition ( = true). |
677 bool unload_ack_is_for_cross_site_transition_; | 719 bool unload_ack_is_for_cross_site_transition_; |
678 | 720 |
679 bool are_javascript_messages_suppressed_; | 721 bool are_javascript_messages_suppressed_; |
680 | 722 |
681 // The mapping of pending javascript calls created by | 723 // The mapping of pending javascript calls created by |
682 // ExecuteJavascriptInWebFrameCallbackResult and their corresponding | 724 // ExecuteJavascriptInWebFrameCallbackResult and their corresponding |
683 // callbacks. | 725 // callbacks. |
684 std::map<int, JavascriptResultCallback> javascript_callbacks_; | 726 std::map<int, JavascriptResultCallback> javascript_callbacks_; |
(...skipping 14 matching lines...) Expand all Loading... | |
699 base::TimeTicks send_should_close_start_time_; | 741 base::TimeTicks send_should_close_start_time_; |
700 | 742 |
701 // Set to true if we requested the on screen keyboard to be displayed. | 743 // Set to true if we requested the on screen keyboard to be displayed. |
702 bool virtual_keyboard_requested_; | 744 bool virtual_keyboard_requested_; |
703 | 745 |
704 #if defined(OS_ANDROID) | 746 #if defined(OS_ANDROID) |
705 // Manages all the android mediaplayer objects and handling IPCs for video. | 747 // Manages all the android mediaplayer objects and handling IPCs for video. |
706 scoped_ptr<BrowserMediaPlayerManager> media_player_manager_; | 748 scoped_ptr<BrowserMediaPlayerManager> media_player_manager_; |
707 #endif | 749 #endif |
708 | 750 |
751 // Used to shutdown this RVH when the unload event is taking too long to | |
752 // execute. | |
753 scoped_ptr<TimeoutMonitor> unload_event_monitor_timeout_; | |
754 | |
755 // Called after receiving the swap out ack when the RVH is in state pending | |
756 // shutdown. Also called if the unload timer times out. | |
757 base::Closure pending_shutdown_on_swap_out_; | |
758 | |
759 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; | |
760 | |
709 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 761 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
710 }; | 762 }; |
711 | 763 |
712 #if defined(COMPILER_MSVC) | 764 #if defined(COMPILER_MSVC) |
713 #pragma warning(pop) | 765 #pragma warning(pop) |
714 #endif | 766 #endif |
715 | 767 |
716 } // namespace content | 768 } // namespace content |
717 | 769 |
718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 770 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |