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

Side by Side Diff: Source/web/NavigatorContentUtilsClientImpl.cpp

Issue 392993005: Custom handlers should throw SecurityError exception if the URL's origin differs from the document'… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Done Created 6 years, 3 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 | « Source/web/NavigatorContentUtilsClientImpl.h ('k') | public/web/WebViewClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "web/NavigatorContentUtilsClientImpl.h" 6 #include "web/NavigatorContentUtilsClientImpl.h"
7 7
8 #include "public/web/WebViewClient.h" 8 #include "public/web/WebViewClient.h"
9 #include "web/WebViewImpl.h" 9 #include "web/WebViewImpl.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre ate(WebViewImpl* webView) 13 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre ate(WebViewImpl* webView)
14 { 14 {
15 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); 15 return adoptPtr(new NavigatorContentUtilsClientImpl(webView));
16 } 16 }
17 17
18 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we bView) 18 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we bView)
19 : m_webView(webView) 19 : m_webView(webView)
20 { 20 {
21 } 21 }
22 22
23 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const KURL& baseURL, const KURL& url, const String& title) 23 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const KURL& url, const String& title)
24 { 24 {
25 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 25 m_webView->client()->registerProtocolHandler(scheme, url, title);
26 } 26 }
27 27
28 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl ::isProtocolHandlerRegistered(const String& scheme, const KURL& baseURL, const K URL& url) 28 NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientImpl ::isProtocolHandlerRegistered(const String& scheme, const KURL& url)
29 { 29 {
30 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); 30 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, url));
31 } 31 }
32 32
33 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const KURL& baseURL, const KURL& url) 33 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const KURL& url)
34 { 34 {
35 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); 35 m_webView->client()->unregisterProtocolHandler(scheme, url);
36 } 36 }
37 37
38 } // namespace blink 38 } // namespace blink
39 39
OLDNEW
« no previous file with comments | « Source/web/NavigatorContentUtilsClientImpl.h ('k') | public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698