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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // user decided the navigation should proceed should be passed as | 264 // user decided the navigation should proceed should be passed as |
265 // |proceed_time|. | 265 // |proceed_time|. |
266 void SetNavigationsSuspended(bool suspend, | 266 void SetNavigationsSuspended(bool suspend, |
267 const base::TimeTicks& proceed_time); | 267 const base::TimeTicks& proceed_time); |
268 | 268 |
269 // Clears any suspended navigation state after a cross-site navigation is | 269 // Clears any suspended navigation state after a cross-site navigation is |
270 // canceled or suspended. This is important if we later return to this | 270 // canceled or suspended. This is important if we later return to this |
271 // RenderViewHost. | 271 // RenderViewHost. |
272 void CancelSuspendedNavigations(); | 272 void CancelSuspendedNavigations(); |
273 | 273 |
| 274 // Whether the initial empty page of this view has been accessed by another |
| 275 // page, making it unsafe to show the pending URL. Always false after the |
| 276 // first commit. |
| 277 bool has_accessed_initial_document() { |
| 278 return has_accessed_initial_document_; |
| 279 } |
| 280 |
274 // Whether this RenderViewHost has been swapped out to be displayed by a | 281 // Whether this RenderViewHost has been swapped out to be displayed by a |
275 // different process. | 282 // different process. |
276 bool is_swapped_out() const { return is_swapped_out_; } | 283 bool is_swapped_out() const { return is_swapped_out_; } |
277 | 284 |
278 // Tells the renderer that this RenderView is being swapped out for one in a | 285 // Tells the renderer that this RenderView is being swapped out for one in a |
279 // different renderer process. It should run its unload handler and move to | 286 // different renderer process. It should run its unload handler and move to |
280 // a blank document. The renderer should preserve the Frame object until it | 287 // a blank document. The renderer should preserve the Frame object until it |
281 // exits, in case we come back. The renderer can exit if it has no other | 288 // exits, in case we come back. The renderer can exit if it has no other |
282 // active RenderViews, but not until WasSwappedOut is called (when it is no | 289 // active RenderViews, but not until WasSwappedOut is called (when it is no |
283 // longer visible). | 290 // longer visible). |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 void OnMediaNotification(int64 player_cookie, | 556 void OnMediaNotification(int64 player_cookie, |
550 bool has_video, | 557 bool has_video, |
551 bool has_audio, | 558 bool has_audio, |
552 bool is_playing); | 559 bool is_playing); |
553 void OnRequestDesktopNotificationPermission(const GURL& origin, | 560 void OnRequestDesktopNotificationPermission(const GURL& origin, |
554 int callback_id); | 561 int callback_id); |
555 void OnShowDesktopNotification( | 562 void OnShowDesktopNotification( |
556 const ShowDesktopNotificationHostMsgParams& params); | 563 const ShowDesktopNotificationHostMsgParams& params); |
557 void OnCancelDesktopNotification(int notification_id); | 564 void OnCancelDesktopNotification(int notification_id); |
558 void OnRunFileChooser(const FileChooserParams& params); | 565 void OnRunFileChooser(const FileChooserParams& params); |
| 566 void OnDidAccessInitialDocument(); |
559 void OnDomOperationResponse(const std::string& json_string, | 567 void OnDomOperationResponse(const std::string& json_string, |
560 int automation_id); | 568 int automation_id); |
561 void OnFrameTreeUpdated(const std::string& frame_tree); | 569 void OnFrameTreeUpdated(const std::string& frame_tree); |
562 void OnGetWindowSnapshot(const int snapshot_id); | 570 void OnGetWindowSnapshot(const int snapshot_id); |
563 | 571 |
564 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 572 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
565 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 573 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
566 #endif | 574 #endif |
567 | 575 |
568 private: | 576 private: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 // request, until we hear back from the onbeforeunload handler of the old | 610 // request, until we hear back from the onbeforeunload handler of the old |
603 // RenderViewHost. | 611 // RenderViewHost. |
604 bool navigations_suspended_; | 612 bool navigations_suspended_; |
605 | 613 |
606 // We only buffer the params for a suspended navigation while we have a | 614 // We only buffer the params for a suspended navigation while we have a |
607 // pending RVH for a WebContentsImpl. There will only ever be one suspended | 615 // pending RVH for a WebContentsImpl. There will only ever be one suspended |
608 // navigation, because WebContentsImpl will destroy the pending RVH and create | 616 // navigation, because WebContentsImpl will destroy the pending RVH and create |
609 // a new one if a second navigation occurs. | 617 // a new one if a second navigation occurs. |
610 scoped_ptr<ViewMsg_Navigate_Params> suspended_nav_params_; | 618 scoped_ptr<ViewMsg_Navigate_Params> suspended_nav_params_; |
611 | 619 |
| 620 // Whether the initial empty page of this view has been accessed by another |
| 621 // page, making it unsafe to show the pending URL. Usually false unless |
| 622 // another window tries to modify the blank page. Always false after the |
| 623 // first commit. |
| 624 bool has_accessed_initial_document_; |
| 625 |
612 // Whether this RenderViewHost is currently swapped out, such that the view is | 626 // Whether this RenderViewHost is currently swapped out, such that the view is |
613 // being rendered by another process. | 627 // being rendered by another process. |
614 bool is_swapped_out_; | 628 bool is_swapped_out_; |
615 | 629 |
616 // Whether this RenderView is responsible for displaying a subframe in a | 630 // Whether this RenderView is responsible for displaying a subframe in a |
617 // different process from its parent page. | 631 // different process from its parent page. |
618 bool is_subframe_; | 632 bool is_subframe_; |
619 | 633 |
620 // If we were asked to RunModal, then this will hold the reply_msg that we | 634 // If we were asked to RunModal, then this will hold the reply_msg that we |
621 // must return to the renderer to unblock it. | 635 // must return to the renderer to unblock it. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 709 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
696 }; | 710 }; |
697 | 711 |
698 #if defined(COMPILER_MSVC) | 712 #if defined(COMPILER_MSVC) |
699 #pragma warning(pop) | 713 #pragma warning(pop) |
700 #endif | 714 #endif |
701 | 715 |
702 } // namespace content | 716 } // namespace content |
703 | 717 |
704 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 718 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |