| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 bool ChromeRenderViewObserver::allowWebComponents(const WebDocument& document, | 513 bool ChromeRenderViewObserver::allowWebComponents(const WebDocument& document, |
| 514 bool defaultValue) { | 514 bool defaultValue) { |
| 515 if (defaultValue) | 515 if (defaultValue) |
| 516 return true; | 516 return true; |
| 517 | 517 |
| 518 WebSecurityOrigin origin = document.securityOrigin(); | 518 WebSecurityOrigin origin = document.securityOrigin(); |
| 519 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) | 519 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) |
| 520 return true; | 520 return true; |
| 521 | 521 |
| 522 if (const extensions::Extension* extension = GetExtension(origin)) { | 522 if (const extensions::Extension* extension = GetExtension(origin)) { |
| 523 // Titlebars in app windows are implmented via Shadow DOM. |
| 524 if (extension->HasAPIPermission(APIPermission::kAppWindow)) |
| 525 return true; |
| 526 |
| 523 // The <browser> tag is implemented via Shadow DOM. | 527 // The <browser> tag is implemented via Shadow DOM. |
| 524 if (extension->HasAPIPermission(APIPermission::kBrowserTag)) | 528 if (extension->HasAPIPermission(APIPermission::kBrowserTag)) |
| 525 return true; | 529 return true; |
| 526 | 530 |
| 527 if (extension->HasAPIPermission(APIPermission::kExperimental)) | 531 if (extension->HasAPIPermission(APIPermission::kExperimental)) |
| 528 return true; | 532 return true; |
| 529 } | 533 } |
| 530 | 534 |
| 531 return false; | 535 return false; |
| 532 } | 536 } |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 reinterpret_cast<const unsigned char*>(&data[0]); | 1118 reinterpret_cast<const unsigned char*>(&data[0]); |
| 1115 | 1119 |
| 1116 return decoder.Decode(src_data, data.size()); | 1120 return decoder.Decode(src_data, data.size()); |
| 1117 } | 1121 } |
| 1118 return SkBitmap(); | 1122 return SkBitmap(); |
| 1119 } | 1123 } |
| 1120 | 1124 |
| 1121 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { | 1125 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { |
| 1122 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); | 1126 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); |
| 1123 } | 1127 } |
| OLD | NEW |