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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
601 // Tells the renderer that this RenderFrame will soon be swapped out, and thus | 601 // Tells the renderer that this RenderFrame will soon be swapped out, and thus |
602 // not to create any new modal dialogs until it happens. This must be done | 602 // not to create any new modal dialogs until it happens. This must be done |
603 // separately so that the ScopedPageLoadDeferrers of any current dialogs are | 603 // separately so that the ScopedPageLoadDeferrers of any current dialogs are |
604 // no longer on the stack when we attempt to swap it out. | 604 // no longer on the stack when we attempt to swap it out. |
605 void SuppressFurtherDialogs(); | 605 void SuppressFurtherDialogs(); |
606 | 606 |
607 void SetHasReceivedUserGesture(); | 607 void SetHasReceivedUserGesture(); |
608 | 608 |
609 void ClearFocusedElement(); | 609 void ClearFocusedElement(); |
610 | 610 |
611 // Returns whether the given URL is allowed to commit in the current process. | |
612 // This is a more conservative check than RenderProcessHost::FilterURL, since | |
613 // it will be used to kill processes that commit unauthorized URLs. | |
614 bool CanCommitURL(const GURL& url); | |
clamy
2017/02/22 16:40:16
You also need to move the function in the .cc file
arthursonzogni
2017/02/22 17:31:13
Done.
| |
615 | |
611 // PlzNavigate: returns the PreviewsState of the last successful navigation | 616 // PlzNavigate: returns the PreviewsState of the last successful navigation |
612 // that made a network request. The PreviewsState is a bitmask of potentially | 617 // that made a network request. The PreviewsState is a bitmask of potentially |
613 // several Previews optimizations. | 618 // several Previews optimizations. |
614 PreviewsState last_navigation_previews_state() const { | 619 PreviewsState last_navigation_previews_state() const { |
615 return last_navigation_previews_state_; | 620 return last_navigation_previews_state_; |
616 } | 621 } |
617 | 622 |
618 bool has_focused_editable_element() const { | 623 bool has_focused_editable_element() const { |
619 return has_focused_editable_element_; | 624 return has_focused_editable_element_; |
620 } | 625 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
773 const gfx::Rect& initial_rect, | 778 const gfx::Rect& initial_rect, |
774 bool user_gesture); | 779 bool user_gesture); |
775 | 780 |
776 // Registers Mojo interfaces that this frame host makes available. | 781 // Registers Mojo interfaces that this frame host makes available. |
777 void RegisterMojoInterfaces(); | 782 void RegisterMojoInterfaces(); |
778 | 783 |
779 // Resets any waiting state of this RenderFrameHost that is no longer | 784 // Resets any waiting state of this RenderFrameHost that is no longer |
780 // relevant. | 785 // relevant. |
781 void ResetWaitingState(); | 786 void ResetWaitingState(); |
782 | 787 |
783 // Returns whether the given URL is allowed to commit in the current process. | |
784 // This is a more conservative check than RenderProcessHost::FilterURL, since | |
785 // it will be used to kill processes that commit unauthorized URLs. | |
786 bool CanCommitURL(const GURL& url); | |
787 | |
788 // Returns whether the given origin is allowed to commit in the current | 788 // Returns whether the given origin is allowed to commit in the current |
789 // RenderFrameHost. The |url| is used to ensure it matches the origin in cases | 789 // RenderFrameHost. The |url| is used to ensure it matches the origin in cases |
790 // where it is applicable. This is a more conservative check than | 790 // where it is applicable. This is a more conservative check than |
791 // RenderProcessHost::FilterURL, since it will be used to kill processes that | 791 // RenderProcessHost::FilterURL, since it will be used to kill processes that |
792 // commit unauthorized origins. | 792 // commit unauthorized origins. |
793 bool CanCommitOrigin(const url::Origin& origin, const GURL& url); | 793 bool CanCommitOrigin(const url::Origin& origin, const GURL& url); |
794 | 794 |
795 // Asserts that the given RenderFrameHostImpl is part of the same browser | 795 // Asserts that the given RenderFrameHostImpl is part of the same browser |
796 // context (and crashes if not), then returns whether the given frame is | 796 // context (and crashes if not), then returns whether the given frame is |
797 // part of the same site instance. | 797 // part of the same site instance. |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1156 | 1156 |
1157 // NOTE: This must be the last member. | 1157 // NOTE: This must be the last member. |
1158 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1158 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1159 | 1159 |
1160 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1160 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1161 }; | 1161 }; |
1162 | 1162 |
1163 } // namespace content | 1163 } // namespace content |
1164 | 1164 |
1165 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1165 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |