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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 // user decided the navigation should proceed should be passed as | 276 // user decided the navigation should proceed should be passed as |
277 // |proceed_time|. | 277 // |proceed_time|. |
278 void SetNavigationsSuspended(bool suspend, | 278 void SetNavigationsSuspended(bool suspend, |
279 const base::TimeTicks& proceed_time); | 279 const base::TimeTicks& proceed_time); |
280 | 280 |
281 // Clears any suspended navigation state after a cross-site navigation is | 281 // Clears any suspended navigation state after a cross-site navigation is |
282 // canceled or suspended. This is important if we later return to this | 282 // canceled or suspended. This is important if we later return to this |
283 // RenderViewHost. | 283 // RenderViewHost. |
284 void CancelSuspendedNavigations(); | 284 void CancelSuspendedNavigations(); |
285 | 285 |
286 // Whether the initial empty page of this view has been accessed by another | |
287 // page, making it unsafe to show the pending URL. Always false after the | |
288 // first commit. | |
289 bool has_accessed_initial_document() { | |
290 return has_accessed_initial_document_; | |
291 } | |
292 | |
293 // Whether this RenderViewHost has been swapped out to be displayed by a | 286 // Whether this RenderViewHost has been swapped out to be displayed by a |
294 // different process. | 287 // different process. |
295 bool IsSwappedOut() const { return rvh_state_ == STATE_SWAPPED_OUT; } | 288 bool IsSwappedOut() const { return rvh_state_ == STATE_SWAPPED_OUT; } |
296 | 289 |
297 // The current state of this RVH. | 290 // The current state of this RVH. |
298 RenderViewHostImplState rvh_state() const { return rvh_state_; } | 291 RenderViewHostImplState rvh_state() const { return rvh_state_; } |
299 | 292 |
300 // Tells the renderer that this RenderView will soon be swapped out, and thus | 293 // Tells the renderer that this RenderView will soon be swapped out, and thus |
301 // not to create any new modal dialogs until it happens. This must be done | 294 // not to create any new modal dialogs until it happens. This must be done |
302 // separately so that the PageGroupLoadDeferrers of any current dialogs are no | 295 // separately so that the PageGroupLoadDeferrers of any current dialogs are no |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 void OnFocusedNodeChanged(bool is_editable_node); | 520 void OnFocusedNodeChanged(bool is_editable_node); |
528 void OnUpdateInspectorSetting(const std::string& key, | 521 void OnUpdateInspectorSetting(const std::string& key, |
529 const std::string& value); | 522 const std::string& value); |
530 void OnClosePageACK(); | 523 void OnClosePageACK(); |
531 void OnAccessibilityEvents( | 524 void OnAccessibilityEvents( |
532 const std::vector<AccessibilityHostMsg_EventParams>& params); | 525 const std::vector<AccessibilityHostMsg_EventParams>& params); |
533 void OnAccessibilityLocationChanges( | 526 void OnAccessibilityLocationChanges( |
534 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); | 527 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
535 void OnDidZoomURL(double zoom_level, bool remember, const GURL& url); | 528 void OnDidZoomURL(double zoom_level, bool remember, const GURL& url); |
536 void OnRunFileChooser(const FileChooserParams& params); | 529 void OnRunFileChooser(const FileChooserParams& params); |
537 void OnDidAccessInitialDocument(); | |
538 void OnFocusedNodeTouched(bool editable); | 530 void OnFocusedNodeTouched(bool editable); |
539 | 531 |
540 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 532 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
541 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 533 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
542 void OnHidePopup(); | 534 void OnHidePopup(); |
543 #endif | 535 #endif |
544 | 536 |
545 private: | 537 private: |
546 // TODO(nasko): Temporarily friend RenderFrameHostImpl, so we don't duplicate | 538 // TODO(nasko): Temporarily friend RenderFrameHostImpl, so we don't duplicate |
547 // utility functions and state needed in both classes, while we move frame | 539 // utility functions and state needed in both classes, while we move frame |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 580 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
589 bool navigations_suspended_; | 581 bool navigations_suspended_; |
590 | 582 |
591 // We only buffer the params for a suspended navigation while we have a | 583 // We only buffer the params for a suspended navigation while we have a |
592 // pending RVH for a WebContentsImpl. There will only ever be one suspended | 584 // pending RVH for a WebContentsImpl. There will only ever be one suspended |
593 // navigation, because WebContentsImpl will destroy the pending RVH and create | 585 // navigation, because WebContentsImpl will destroy the pending RVH and create |
594 // a new one if a second navigation occurs. | 586 // a new one if a second navigation occurs. |
595 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 587 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
596 scoped_ptr<FrameMsg_Navigate_Params> suspended_nav_params_; | 588 scoped_ptr<FrameMsg_Navigate_Params> suspended_nav_params_; |
597 | 589 |
598 // Whether the initial empty page of this view has been accessed by another | |
599 // page, making it unsafe to show the pending URL. Usually false unless | |
600 // another window tries to modify the blank page. Always false after the | |
601 // first commit. | |
602 bool has_accessed_initial_document_; | |
603 | |
604 // The current state of this RVH. | 590 // The current state of this RVH. |
605 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 591 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
606 RenderViewHostImplState rvh_state_; | 592 RenderViewHostImplState rvh_state_; |
607 | 593 |
608 // Routing ID for the main frame's RenderFrameHost. | 594 // Routing ID for the main frame's RenderFrameHost. |
609 int main_frame_routing_id_; | 595 int main_frame_routing_id_; |
610 | 596 |
611 // If we were asked to RunModal, then this will hold the reply_msg that we | 597 // If we were asked to RunModal, then this will hold the reply_msg that we |
612 // must return to the renderer to unblock it. | 598 // must return to the renderer to unblock it. |
613 IPC::Message* run_modal_reply_msg_; | 599 IPC::Message* run_modal_reply_msg_; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 653 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
668 }; | 654 }; |
669 | 655 |
670 #if defined(COMPILER_MSVC) | 656 #if defined(COMPILER_MSVC) |
671 #pragma warning(pop) | 657 #pragma warning(pop) |
672 #endif | 658 #endif |
673 | 659 |
674 } // namespace content | 660 } // namespace content |
675 | 661 |
676 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 662 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |