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_view_observer.h" | 5 #include "chrome/renderer/chrome_render_view_observer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
491 // - The document is running Web UI. | 491 // - The document is running Web UI. |
492 WebSecurityOrigin origin = document.securityOrigin(); | 492 WebSecurityOrigin origin = document.securityOrigin(); |
493 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) | 493 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) |
494 return true; | 494 return true; |
495 const extensions::Extension* extension = | 495 const extensions::Extension* extension = |
496 extension_dispatcher_->extensions()->GetExtensionOrAppByURL( | 496 extension_dispatcher_->extensions()->GetExtensionOrAppByURL( |
497 ExtensionURLInfo(origin, document.url())); | 497 ExtensionURLInfo(origin, document.url())); |
498 if (!extension) | 498 if (!extension) |
499 return false; | 499 return false; |
500 return (extension_dispatcher_->IsExtensionActive(extension->id()) && | 500 return (extension_dispatcher_->IsExtensionActive(extension->id()) && |
501 extension->HasAPIPermission(ExtensionAPIPermission::kExperimental)); | 501 extension->HasAPIPermission(extensions::APIPermission::kExperimental)); |
miket_OOO
2012/06/26 23:23:44
Whitespace! (Sorry to be so strict, but someone el
Peng
2012/06/26 23:32:35
If use old indentation, this Line will be more tha
Peng
2012/06/26 23:42:53
Done.
| |
502 } | 502 } |
503 | 503 |
504 bool ChromeRenderViewObserver::allowWebComponents(const WebDocument& document, | 504 bool ChromeRenderViewObserver::allowWebComponents(const WebDocument& document, |
505 bool defaultValue) { | 505 bool defaultValue) { |
506 if (defaultValue) | 506 if (defaultValue) |
507 return true; | 507 return true; |
508 return IsExperimentalWebFeatureAllowed(document); | 508 return IsExperimentalWebFeatureAllowed(document); |
509 } | 509 } |
510 | 510 |
511 static void SendInsecureContentSignal(int signal) { | 511 static void SendInsecureContentSignal(int signal) { |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1072 reinterpret_cast<const unsigned char*>(&data[0]); | 1072 reinterpret_cast<const unsigned char*>(&data[0]); |
1073 | 1073 |
1074 return decoder.Decode(src_data, data.size()); | 1074 return decoder.Decode(src_data, data.size()); |
1075 } | 1075 } |
1076 return SkBitmap(); | 1076 return SkBitmap(); |
1077 } | 1077 } |
1078 | 1078 |
1079 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { | 1079 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { |
1080 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); | 1080 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); |
1081 } | 1081 } |
OLD | NEW |