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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some missing files. Created 6 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
OLDNEW
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 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 84 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
85 #include "third_party/WebKit/public/web/WebPlugin.h" 85 #include "third_party/WebKit/public/web/WebPlugin.h"
86 #include "third_party/WebKit/public/web/WebPluginParams.h" 86 #include "third_party/WebKit/public/web/WebPluginParams.h"
87 #include "third_party/WebKit/public/web/WebRange.h" 87 #include "third_party/WebKit/public/web/WebRange.h"
88 #include "third_party/WebKit/public/web/WebScriptSource.h" 88 #include "third_party/WebKit/public/web/WebScriptSource.h"
89 #include "third_party/WebKit/public/web/WebSearchableFormData.h" 89 #include "third_party/WebKit/public/web/WebSearchableFormData.h"
90 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" 90 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
91 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 91 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
92 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 92 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
93 #include "third_party/WebKit/public/web/WebView.h" 93 #include "third_party/WebKit/public/web/WebView.h"
94 #include "url/url_constants.h"
94 #include "webkit/child/weburlresponse_extradata_impl.h" 95 #include "webkit/child/weburlresponse_extradata_impl.h"
95 96
96 #if defined(ENABLE_PLUGINS) 97 #if defined(ENABLE_PLUGINS)
97 #include "content/renderer/npapi/webplugin_impl.h" 98 #include "content/renderer/npapi/webplugin_impl.h"
98 #include "content/renderer/pepper/pepper_browser_connection.h" 99 #include "content/renderer/pepper/pepper_browser_connection.h"
99 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 100 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
100 #include "content/renderer/pepper/pepper_webplugin_impl.h" 101 #include "content/renderer/pepper/pepper_webplugin_impl.h"
101 #include "content/renderer/pepper/plugin_module.h" 102 #include "content/renderer/pepper/plugin_module.h"
102 #endif 103 #endif
103 104
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 bool is_form_post) { 269 bool is_form_post) {
269 if (!IsTopLevelNavigation(frame)) 270 if (!IsTopLevelNavigation(frame))
270 return false; 271 return false;
271 272
272 // Navigations initiated within Webkit are not sent out to the external host 273 // Navigations initiated within Webkit are not sent out to the external host
273 // in the following cases. 274 // in the following cases.
274 // 1. The url scheme is not http/https 275 // 1. The url scheme is not http/https
275 // 2. The origin of the url and the opener is the same in which case the 276 // 2. The origin of the url and the opener is the same in which case the
276 // opener relationship is maintained. 277 // opener relationship is maintained.
277 // 3. Reloads/form submits/back forward navigations 278 // 3. Reloads/form submits/back forward navigations
278 if (!url.SchemeIs(kHttpScheme) && !url.SchemeIs(kHttpsScheme)) 279 if (!url.SchemeIs(url::kHttpScheme) && !url.SchemeIs(url::kHttpsScheme))
279 return false; 280 return false;
280 281
281 if (type != blink::WebNavigationTypeReload && 282 if (type != blink::WebNavigationTypeReload &&
282 type != blink::WebNavigationTypeBackForward && !is_form_post) { 283 type != blink::WebNavigationTypeBackForward && !is_form_post) {
283 // The opener relationship between the new window and the parent allows the 284 // The opener relationship between the new window and the parent allows the
284 // new window to script the parent and vice versa. This is not allowed if 285 // new window to script the parent and vice versa. This is not allowed if
285 // the origins of the two domains are different. This can be treated as a 286 // the origins of the two domains are different. This can be treated as a
286 // top level navigation and routed back to the host. 287 // top level navigation and routed back to the host.
287 blink::WebFrame* opener = frame->opener(); 288 blink::WebFrame* opener = frame->opener();
288 if (!opener) 289 if (!opener)
(...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 selection_text_offset_ = offset; 3182 selection_text_offset_ = offset;
3182 selection_range_ = range; 3183 selection_range_ = range;
3183 // This IPC is dispatched by RenderWidetHost, so use its routing ID. 3184 // This IPC is dispatched by RenderWidetHost, so use its routing ID.
3184 Send(new ViewHostMsg_SelectionChanged( 3185 Send(new ViewHostMsg_SelectionChanged(
3185 GetRenderWidget()->routing_id(), text, offset, range)); 3186 GetRenderWidget()->routing_id(), text, offset, range));
3186 } 3187 }
3187 GetRenderWidget()->UpdateSelectionBounds(); 3188 GetRenderWidget()->UpdateSelectionBounds();
3188 } 3189 }
3189 3190
3190 } // namespace content 3191 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698