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 "chrome/renderer/chrome_render_thread_observer.h" | 5 #include "chrome/renderer/chrome_render_thread_observer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <memory> | 10 #include <memory> |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 // chrome-native: is a scheme used for placeholder navigations that allow | 261 // chrome-native: is a scheme used for placeholder navigations that allow |
262 // UIs to be drawn with platform native widgets instead of HTML. These pages | 262 // UIs to be drawn with platform native widgets instead of HTML. These pages |
263 // should not be accessible, and should also be treated as empty documents | 263 // should not be accessible, and should also be treated as empty documents |
264 // that can commit synchronously. No code should be runnable in these pages, | 264 // that can commit synchronously. No code should be runnable in these pages, |
265 // so it should not need to access anything nor should it allow javascript | 265 // so it should not need to access anything nor should it allow javascript |
266 // URLs since it should never be visible to the user. | 266 // URLs since it should never be visible to the user. |
267 WebString native_scheme(base::ASCIIToUTF16(chrome::kChromeNativeScheme)); | 267 WebString native_scheme(base::ASCIIToUTF16(chrome::kChromeNativeScheme)); |
268 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(native_scheme); | 268 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(native_scheme); |
269 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(native_scheme); | 269 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(native_scheme); |
270 WebSecurityPolicy::registerURLSchemeAsNoAccess(native_scheme); | |
271 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( | 270 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( |
272 native_scheme); | 271 native_scheme); |
273 | 272 |
274 thread->GetInterfaceRegistry()->AddInterface( | 273 thread->GetInterfaceRegistry()->AddInterface( |
275 visited_link_slave_->GetBindCallback()); | 274 visited_link_slave_->GetBindCallback()); |
276 } | 275 } |
277 | 276 |
278 ChromeRenderThreadObserver::~ChromeRenderThreadObserver() {} | 277 ChromeRenderThreadObserver::~ChromeRenderThreadObserver() {} |
279 | 278 |
280 void ChromeRenderThreadObserver::RegisterMojoInterfaces( | 279 void ChromeRenderThreadObserver::RegisterMojoInterfaces( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 void ChromeRenderThreadObserver::OnSetFieldTrialGroup( | 339 void ChromeRenderThreadObserver::OnSetFieldTrialGroup( |
341 const std::string& trial_name, | 340 const std::string& trial_name, |
342 const std::string& group_name) { | 341 const std::string& group_name) { |
343 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name); | 342 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name); |
344 } | 343 } |
345 | 344 |
346 const RendererContentSettingRules* | 345 const RendererContentSettingRules* |
347 ChromeRenderThreadObserver::content_setting_rules() const { | 346 ChromeRenderThreadObserver::content_setting_rules() const { |
348 return &content_setting_rules_; | 347 return &content_setting_rules_; |
349 } | 348 } |
OLD | NEW |