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_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 WebKit::WebPlugin* GetWebPluginFromPluginDocument(); | 975 WebKit::WebPlugin* GetWebPluginFromPluginDocument(); |
976 | 976 |
977 // Returns true if the |params| navigation is to an entry that has been | 977 // Returns true if the |params| navigation is to an entry that has been |
978 // cropped due to a recent navigation the browser did not know about. | 978 // cropped due to a recent navigation the browser did not know about. |
979 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, | 979 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, |
980 bool is_reload); | 980 bool is_reload); |
981 | 981 |
982 // Returns false unless this is a top-level navigation that crosses origins. | 982 // Returns false unless this is a top-level navigation that crosses origins. |
983 bool IsNonLocalTopLevelNavigation(const GURL& url, | 983 bool IsNonLocalTopLevelNavigation(const GURL& url, |
984 WebKit::WebFrame* frame, | 984 WebKit::WebFrame* frame, |
985 WebKit::WebNavigationType type); | 985 WebKit::WebNavigationType type) const; |
| 986 |
| 987 // Returns true if |frame| is the top frame, or if the URL being loaded is |
| 988 // from a different origin than the top frame's. |
| 989 bool IsNonLocalOrTopLevelNavigation(const GURL& url, |
| 990 WebKit::WebFrame* frame) const; |
986 | 991 |
987 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, | 992 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, |
988 const WebKit::WebURLError& error, | 993 const WebKit::WebURLError& error, |
989 bool replace); | 994 bool replace); |
990 | 995 |
991 // Make this RenderView show an empty, unscriptable page. | 996 // Make this RenderView show an empty, unscriptable page. |
992 void NavigateToSwappedOutURL(); | 997 void NavigateToSwappedOutURL(); |
993 | 998 |
994 // If we initiated a navigation, this function will populate |document_state| | 999 // If we initiated a navigation, this function will populate |document_state| |
995 // with the navigation information saved in OnNavigate(). | 1000 // with the navigation information saved in OnNavigate(). |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 // bunch of stuff, you should probably create a helper class and put your | 1348 // bunch of stuff, you should probably create a helper class and put your |
1344 // data and methods on that to avoid bloating RenderView more. You can | 1349 // data and methods on that to avoid bloating RenderView more. You can |
1345 // use the Observer interface to filter IPC messages and receive frame change | 1350 // use the Observer interface to filter IPC messages and receive frame change |
1346 // notifications. | 1351 // notifications. |
1347 // --------------------------------------------------------------------------- | 1352 // --------------------------------------------------------------------------- |
1348 | 1353 |
1349 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1354 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1350 }; | 1355 }; |
1351 | 1356 |
1352 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1357 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |