Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: content/renderer/render_view_impl.h

Issue 10387074: Only disallow top-level navigations in platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add blob: URLs, use WebSecurityOrigin Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 WebKit::WebPlugin* GetWebPluginFromPluginDocument(); 985 WebKit::WebPlugin* GetWebPluginFromPluginDocument();
986 986
987 // Returns true if the |params| navigation is to an entry that has been 987 // Returns true if the |params| navigation is to an entry that has been
988 // cropped due to a recent navigation the browser did not know about. 988 // cropped due to a recent navigation the browser did not know about.
989 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, 989 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params,
990 bool is_reload); 990 bool is_reload);
991 991
992 // Returns false unless this is a top-level navigation that crosses origins. 992 // Returns false unless this is a top-level navigation that crosses origins.
993 bool IsNonLocalTopLevelNavigation(const GURL& url, 993 bool IsNonLocalTopLevelNavigation(const GURL& url,
994 WebKit::WebFrame* frame, 994 WebKit::WebFrame* frame,
995 WebKit::WebNavigationType type); 995 WebKit::WebNavigationType type) const;
996
997 // Returns true if |frame| is the top frame, or if the URL being loaded is
998 // from a different origin than the top frame's (except for data: URLs, which
999 // are not considered remote).
1000 bool IsRemoteOrTopLevelNavigation(const GURL& url,
1001 WebKit::WebFrame* frame) const;
996 1002
997 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, 1003 bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame,
998 const WebKit::WebURLError& error, 1004 const WebKit::WebURLError& error,
999 bool replace); 1005 bool replace);
1000 1006
1001 // Make this RenderView show an empty, unscriptable page. 1007 // Make this RenderView show an empty, unscriptable page.
1002 void NavigateToSwappedOutURL(); 1008 void NavigateToSwappedOutURL();
1003 1009
1004 // If we initiated a navigation, this function will populate |document_state| 1010 // If we initiated a navigation, this function will populate |document_state|
1005 // with the navigation information saved in OnNavigate(). 1011 // with the navigation information saved in OnNavigate().
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 // bunch of stuff, you should probably create a helper class and put your 1359 // bunch of stuff, you should probably create a helper class and put your
1354 // data and methods on that to avoid bloating RenderView more. You can 1360 // data and methods on that to avoid bloating RenderView more. You can
1355 // use the Observer interface to filter IPC messages and receive frame change 1361 // use the Observer interface to filter IPC messages and receive frame change
1356 // notifications. 1362 // notifications.
1357 // --------------------------------------------------------------------------- 1363 // ---------------------------------------------------------------------------
1358 1364
1359 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1365 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1360 }; 1366 };
1361 1367
1362 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1368 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698