| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "extensions/renderer/extension_injection_host.h" | 5 #include "extensions/renderer/extension_injection_host.h" |
| 6 | 6 |
| 7 #include "content/public/renderer/render_frame.h" | 7 #include "content/public/renderer/render_frame.h" |
| 8 #include "extensions/common/constants.h" | 8 #include "extensions/common/constants.h" |
| 9 #include "extensions/common/manifest_handlers/csp_info.h" | 9 #include "extensions/common/manifest_handlers/csp_info.h" |
| 10 #include "extensions/renderer/renderer_extension_registry.h" | 10 #include "extensions/renderer/renderer_extension_registry.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 return access; | 87 return access; |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool ExtensionInjectionHost::ShouldNotifyBrowserOfInjection() const { | 90 bool ExtensionInjectionHost::ShouldNotifyBrowserOfInjection() const { |
| 91 // We notify the browser of any injection if the extension has no withheld | 91 // We notify the browser of any injection if the extension has no withheld |
| 92 // permissions (i.e., the permissions weren't restricted), but would have | 92 // permissions (i.e., the permissions weren't restricted), but would have |
| 93 // otherwise been affected by the scripts-require-action feature. | 93 // otherwise been affected by the scripts-require-action feature. |
| 94 return extension_->permissions_data()->withheld_permissions()->IsEmpty() && | 94 return extension_->permissions_data()->withheld_permissions()->IsEmpty() && |
| 95 PermissionsData::ScriptsMayRequireActionForExtension( | 95 PermissionsData::ScriptsMayRequireActionForExtension( |
| 96 extension_, | 96 extension_, extension_->permissions_data()->active_permissions()); |
| 97 extension_->permissions_data()->active_permissions().get()); | |
| 98 } | 97 } |
| 99 | 98 |
| 100 } // namespace extensions | 99 } // namespace extensions |
| OLD | NEW |