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

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

Issue 485103005: Preparation for removing same origin check as blink checks for the same (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after
3947 GURL base(base_url); 3947 GURL base(base_url);
3948 GURL absolute_url = base.Resolve(base::UTF16ToUTF8(url.string())); 3948 GURL absolute_url = base.Resolve(base::UTF16ToUTF8(url.string()));
3949 if (base.GetOrigin() != absolute_url.GetOrigin()) 3949 if (base.GetOrigin() != absolute_url.GetOrigin())
3950 return; 3950 return;
3951 Send(new ViewHostMsg_UnregisterProtocolHandler(routing_id_, 3951 Send(new ViewHostMsg_UnregisterProtocolHandler(routing_id_,
3952 base::UTF16ToUTF8(scheme), 3952 base::UTF16ToUTF8(scheme),
3953 absolute_url, 3953 absolute_url,
3954 user_gesture)); 3954 user_gesture));
3955 } 3955 }
3956 3956
3957 void RenderViewImpl::registerProtocolHandler(const WebString& scheme,
jamesr 2014/08/22 05:34:36 annotate with a comment or something that the regi
3958 const WebURL& url,
3959 const WebString& title) {
3960 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture();
3961 Send(new ViewHostMsg_RegisterProtocolHandler(routing_id_,
3962 base::UTF16ToUTF8(scheme),
3963 url,
3964 title,
3965 user_gesture));
3966 }
3967
3968 void RenderViewImpl::unregisterProtocolHandler(const WebString& scheme,
3969 const WebURL& url) {
3970 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture();
3971 Send(new ViewHostMsg_UnregisterProtocolHandler(routing_id_,
3972 base::UTF16ToUTF8(scheme),
3973 url,
3974 user_gesture));
3975 }
3976
3957 blink::WebPageVisibilityState RenderViewImpl::visibilityState() const { 3977 blink::WebPageVisibilityState RenderViewImpl::visibilityState() const {
3958 blink::WebPageVisibilityState current_state = is_hidden() ? 3978 blink::WebPageVisibilityState current_state = is_hidden() ?
3959 blink::WebPageVisibilityStateHidden : 3979 blink::WebPageVisibilityStateHidden :
3960 blink::WebPageVisibilityStateVisible; 3980 blink::WebPageVisibilityStateVisible;
3961 blink::WebPageVisibilityState override_state = current_state; 3981 blink::WebPageVisibilityState override_state = current_state;
3962 // TODO(jam): move this method to WebFrameClient. 3982 // TODO(jam): move this method to WebFrameClient.
3963 if (GetContentClient()->renderer()-> 3983 if (GetContentClient()->renderer()->
3964 ShouldOverridePageVisibilityState(main_render_frame_.get(), 3984 ShouldOverridePageVisibilityState(main_render_frame_.get(),
3965 &override_state)) 3985 &override_state))
3966 return override_state; 3986 return override_state;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 std::vector<gfx::Size> sizes; 4295 std::vector<gfx::Size> sizes;
4276 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4296 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4277 if (!url.isEmpty()) 4297 if (!url.isEmpty())
4278 urls.push_back( 4298 urls.push_back(
4279 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4299 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4280 } 4300 }
4281 SendUpdateFaviconURL(urls); 4301 SendUpdateFaviconURL(urls);
4282 } 4302 }
4283 4303
4284 } // namespace content 4304 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698