| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 WebSecurityOrigin origin = document.securityOrigin(); | 487 WebSecurityOrigin origin = document.securityOrigin(); |
| 488 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) | 488 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) |
| 489 return true; | 489 return true; |
| 490 | 490 |
| 491 if (const extensions::Extension* extension = GetExtension(origin)) { | 491 if (const extensions::Extension* extension = GetExtension(origin)) { |
| 492 // Titlebars in app windows are implmented via Shadow DOM. | 492 // Titlebars in app windows are implmented via Shadow DOM. |
| 493 if (extension->HasAPIPermission(APIPermission::kAppWindow)) | 493 if (extension->HasAPIPermission(APIPermission::kAppWindow)) |
| 494 return true; | 494 return true; |
| 495 | 495 |
| 496 // The <browser> tag is implemented via Shadow DOM. | 496 // The <webview> tag is implemented via Shadow DOM. |
| 497 if (extension->HasAPIPermission(APIPermission::kBrowserTag)) | 497 if (extension->HasAPIPermission(APIPermission::kWebView)) |
| 498 return true; | 498 return true; |
| 499 | 499 |
| 500 if (extension->HasAPIPermission(APIPermission::kExperimental)) | 500 if (extension->HasAPIPermission(APIPermission::kExperimental)) |
| 501 return true; | 501 return true; |
| 502 } else { | 502 } else { |
| 503 // When a packaged app opens a window with a sandboxed resource, the origin | 503 // When a packaged app opens a window with a sandboxed resource, the origin |
| 504 // will be unique (i.e. the empty string), so the fact that it is a shell | 504 // will be unique (i.e. the empty string), so the fact that it is a shell |
| 505 // window must be deduced from the view type instead to enable web | 505 // window must be deduced from the view type instead to enable web |
| 506 // components for HTML titlebars. | 506 // components for HTML titlebars. |
| 507 extensions::ExtensionHelper* helper = | 507 extensions::ExtensionHelper* helper = |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 reinterpret_cast<const unsigned char*>(&data[0]); | 982 reinterpret_cast<const unsigned char*>(&data[0]); |
| 983 | 983 |
| 984 return decoder.Decode(src_data, data.size()); | 984 return decoder.Decode(src_data, data.size()); |
| 985 } | 985 } |
| 986 return SkBitmap(); | 986 return SkBitmap(); |
| 987 } | 987 } |
| 988 | 988 |
| 989 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { | 989 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { |
| 990 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); | 990 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); |
| 991 } | 991 } |
| OLD | NEW |