| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 // Tells the renderer that this RenderFrame will soon be swapped out, and thus | 600 // Tells the renderer that this RenderFrame will soon be swapped out, and thus |
| 601 // not to create any new modal dialogs until it happens. This must be done | 601 // not to create any new modal dialogs until it happens. This must be done |
| 602 // separately so that the ScopedPageLoadDeferrers of any current dialogs are | 602 // separately so that the ScopedPageLoadDeferrers of any current dialogs are |
| 603 // no longer on the stack when we attempt to swap it out. | 603 // no longer on the stack when we attempt to swap it out. |
| 604 void SuppressFurtherDialogs(); | 604 void SuppressFurtherDialogs(); |
| 605 | 605 |
| 606 void SetHasReceivedUserGesture(); | 606 void SetHasReceivedUserGesture(); |
| 607 | 607 |
| 608 void ClearFocusedElement(); | 608 void ClearFocusedElement(); |
| 609 | 609 |
| 610 // Returns whether the given URL is allowed to commit in the current process. |
| 611 // This is a more conservative check than RenderProcessHost::FilterURL, since |
| 612 // it will be used to kill processes that commit unauthorized URLs. |
| 613 bool CanCommitURL(const GURL& url); |
| 614 |
| 610 // PlzNavigate: returns the PreviewsState of the last successful navigation | 615 // PlzNavigate: returns the PreviewsState of the last successful navigation |
| 611 // that made a network request. The PreviewsState is a bitmask of potentially | 616 // that made a network request. The PreviewsState is a bitmask of potentially |
| 612 // several Previews optimizations. | 617 // several Previews optimizations. |
| 613 PreviewsState last_navigation_previews_state() const { | 618 PreviewsState last_navigation_previews_state() const { |
| 614 return last_navigation_previews_state_; | 619 return last_navigation_previews_state_; |
| 615 } | 620 } |
| 616 | 621 |
| 617 bool has_focused_editable_element() const { | 622 bool has_focused_editable_element() const { |
| 618 return has_focused_editable_element_; | 623 return has_focused_editable_element_; |
| 619 } | 624 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 const gfx::Rect& initial_rect, | 775 const gfx::Rect& initial_rect, |
| 771 bool user_gesture); | 776 bool user_gesture); |
| 772 | 777 |
| 773 // Registers Mojo interfaces that this frame host makes available. | 778 // Registers Mojo interfaces that this frame host makes available. |
| 774 void RegisterMojoInterfaces(); | 779 void RegisterMojoInterfaces(); |
| 775 | 780 |
| 776 // Resets any waiting state of this RenderFrameHost that is no longer | 781 // Resets any waiting state of this RenderFrameHost that is no longer |
| 777 // relevant. | 782 // relevant. |
| 778 void ResetWaitingState(); | 783 void ResetWaitingState(); |
| 779 | 784 |
| 780 // Returns whether the given URL is allowed to commit in the current process. | |
| 781 // This is a more conservative check than RenderProcessHost::FilterURL, since | |
| 782 // it will be used to kill processes that commit unauthorized URLs. | |
| 783 bool CanCommitURL(const GURL& url); | |
| 784 | |
| 785 // Returns whether the given origin is allowed to commit in the current | 785 // Returns whether the given origin is allowed to commit in the current |
| 786 // RenderFrameHost. The |url| is used to ensure it matches the origin in cases | 786 // RenderFrameHost. The |url| is used to ensure it matches the origin in cases |
| 787 // where it is applicable. This is a more conservative check than | 787 // where it is applicable. This is a more conservative check than |
| 788 // RenderProcessHost::FilterURL, since it will be used to kill processes that | 788 // RenderProcessHost::FilterURL, since it will be used to kill processes that |
| 789 // commit unauthorized origins. | 789 // commit unauthorized origins. |
| 790 bool CanCommitOrigin(const url::Origin& origin, const GURL& url); | 790 bool CanCommitOrigin(const url::Origin& origin, const GURL& url); |
| 791 | 791 |
| 792 // Asserts that the given RenderFrameHostImpl is part of the same browser | 792 // Asserts that the given RenderFrameHostImpl is part of the same browser |
| 793 // context (and crashes if not), then returns whether the given frame is | 793 // context (and crashes if not), then returns whether the given frame is |
| 794 // part of the same site instance. | 794 // part of the same site instance. |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 | 1151 |
| 1152 // NOTE: This must be the last member. | 1152 // NOTE: This must be the last member. |
| 1153 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1153 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 1154 | 1154 |
| 1155 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1155 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 1156 }; | 1156 }; |
| 1157 | 1157 |
| 1158 } // namespace content | 1158 } // namespace content |
| 1159 | 1159 |
| 1160 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1160 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |