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 #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 5807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5818 | 5818 |
5819 double RenderViewImpl::zoomLevelToZoomFactor(double zoom_level) const { | 5819 double RenderViewImpl::zoomLevelToZoomFactor(double zoom_level) const { |
5820 return ZoomLevelToZoomFactor(zoom_level); | 5820 return ZoomLevelToZoomFactor(zoom_level); |
5821 } | 5821 } |
5822 | 5822 |
5823 double RenderViewImpl::zoomFactorToZoomLevel(double factor) const { | 5823 double RenderViewImpl::zoomFactorToZoomLevel(double factor) const { |
5824 return ZoomFactorToZoomLevel(factor); | 5824 return ZoomFactorToZoomLevel(factor); |
5825 } | 5825 } |
5826 | 5826 |
5827 void RenderViewImpl::registerProtocolHandler(const WebString& scheme, | 5827 void RenderViewImpl::registerProtocolHandler(const WebString& scheme, |
5828 const WebString& base_url, | 5828 const WebURL& base_url, |
5829 const WebString& url, | 5829 const WebURL& url, |
5830 const WebString& title) { | 5830 const WebString& title) { |
5831 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); | 5831 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); |
5832 GURL base(base_url); | 5832 GURL base(base_url); |
5833 GURL absolute_url = base.Resolve(base::UTF16ToUTF8(url)); | 5833 GURL absolute_url = base.Resolve(base::UTF16ToUTF8(url.string())); |
5834 if (base.GetOrigin() != absolute_url.GetOrigin()) { | 5834 if (base.GetOrigin() != absolute_url.GetOrigin()) { |
5835 return; | 5835 return; |
5836 } | 5836 } |
5837 Send(new ViewHostMsg_RegisterProtocolHandler(routing_id_, | 5837 Send(new ViewHostMsg_RegisterProtocolHandler(routing_id_, |
5838 base::UTF16ToUTF8(scheme), | 5838 base::UTF16ToUTF8(scheme), |
5839 absolute_url, | 5839 absolute_url, |
5840 title, | 5840 title, |
5841 user_gesture)); | 5841 user_gesture)); |
5842 } | 5842 } |
5843 | 5843 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6233 for (size_t i = 0; i < icon_urls.size(); i++) { | 6233 for (size_t i = 0; i < icon_urls.size(); i++) { |
6234 WebURL url = icon_urls[i].iconURL(); | 6234 WebURL url = icon_urls[i].iconURL(); |
6235 if (!url.isEmpty()) | 6235 if (!url.isEmpty()) |
6236 urls.push_back(FaviconURL(url, | 6236 urls.push_back(FaviconURL(url, |
6237 ToFaviconType(icon_urls[i].iconType()))); | 6237 ToFaviconType(icon_urls[i].iconType()))); |
6238 } | 6238 } |
6239 SendUpdateFaviconURL(urls); | 6239 SendUpdateFaviconURL(urls); |
6240 } | 6240 } |
6241 | 6241 |
6242 } // namespace content | 6242 } // namespace content |
OLD | NEW |