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

Side by Side Diff: android_webview/renderer/aw_content_renderer_client.cc

Issue 2623353002: Share schemes needed for mixed content checking between the browser and renderer. (Closed)
Patch Set: Created 3 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "android_webview/renderer/aw_content_renderer_client.h" 5 #include "android_webview/renderer/aw_content_renderer_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "android_webview/common/aw_resource.h" 9 #include "android_webview/common/aw_resource.h"
10 #include "android_webview/common/aw_switches.h" 10 #include "android_webview/common/aw_switches.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 aw_render_thread_observer_.reset(new AwRenderThreadObserver); 72 aw_render_thread_observer_.reset(new AwRenderThreadObserver);
73 thread->AddObserver(aw_render_thread_observer_.get()); 73 thread->AddObserver(aw_render_thread_observer_.get());
74 74
75 visited_link_slave_.reset(new visitedlink::VisitedLinkSlave); 75 visited_link_slave_.reset(new visitedlink::VisitedLinkSlave);
76 thread->GetInterfaceRegistry()->AddInterface( 76 thread->GetInterfaceRegistry()->AddInterface(
77 visited_link_slave_->GetBindCallback()); 77 visited_link_slave_->GetBindCallback());
78 78
79 blink::WebString content_scheme(base::ASCIIToUTF16(url::kContentScheme)); 79 blink::WebString content_scheme(base::ASCIIToUTF16(url::kContentScheme));
80 blink::WebSecurityPolicy::registerURLSchemeAsLocal(content_scheme); 80 blink::WebSecurityPolicy::registerURLSchemeAsLocal(content_scheme);
81 81
82 blink::WebString aw_scheme(
83 base::ASCIIToUTF16(android_webview::kAndroidWebViewVideoPosterScheme));
84 blink::WebSecurityPolicy::registerURLSchemeAsSecure(aw_scheme);
85
86 #if BUILDFLAG(ENABLE_SPELLCHECK) 82 #if BUILDFLAG(ENABLE_SPELLCHECK)
87 if (!spellcheck_) { 83 if (!spellcheck_) {
88 spellcheck_ = base::MakeUnique<SpellCheck>(); 84 spellcheck_ = base::MakeUnique<SpellCheck>();
89 thread->AddObserver(spellcheck_.get()); 85 thread->AddObserver(spellcheck_.get());
90 } 86 }
91 #endif 87 #endif
92 } 88 }
93 89
94 bool AwContentRendererClient::HandleNavigation( 90 bool AwContentRendererClient::HandleNavigation(
95 content::RenderFrame* render_frame, 91 content::RenderFrame* render_frame,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 for (auto* extension : kMediaPlayerExtensions) { 279 for (auto* extension : kMediaPlayerExtensions) {
284 if (base::EndsWith(url.path(), extension, 280 if (base::EndsWith(url.path(), extension,
285 base::CompareCase::INSENSITIVE_ASCII)) { 281 base::CompareCase::INSENSITIVE_ASCII)) {
286 return true; 282 return true;
287 } 283 }
288 } 284 }
289 return false; 285 return false;
290 } 286 }
291 287
292 } // namespace android_webview 288 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698