| 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/browser/extensions/permissions_updater.h" | 5 #include "chrome/browser/extensions/permissions_updater.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h" | 11 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h" |
| 12 #include "chrome/browser/extensions/extension_prefs.h" | |
| 13 #include "chrome/browser/extensions/extension_system.h" | 12 #include "chrome/browser/extensions/extension_system.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/common/extensions/api/permissions.h" | 14 #include "chrome/common/extensions/api/permissions.h" |
| 16 #include "chrome/common/extensions/extension_messages.h" | 15 #include "chrome/common/extensions/extension_messages.h" |
| 17 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
| 18 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
| 19 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/render_process_host.h" | 19 #include "content/public/browser/render_process_host.h" |
| 21 #include "extensions/browser/event_router.h" | 20 #include "extensions/browser/event_router.h" |
| 21 #include "extensions/browser/extension_prefs.h" |
| 22 #include "extensions/common/extension.h" | 22 #include "extensions/common/extension.h" |
| 23 #include "extensions/common/permissions/permissions_data.h" | 23 #include "extensions/common/permissions/permissions_data.h" |
| 24 | 24 |
| 25 using content::RenderProcessHost; | 25 using content::RenderProcessHost; |
| 26 using extensions::permissions_api_helpers::PackPermissionSet; | 26 using extensions::permissions_api_helpers::PackPermissionSet; |
| 27 | 27 |
| 28 namespace extensions { | 28 namespace extensions { |
| 29 | 29 |
| 30 namespace permissions = api::permissions; | 30 namespace permissions = api::permissions; |
| 31 | 31 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 info.scriptable_hosts = changed->scriptable_hosts(); | 148 info.scriptable_hosts = changed->scriptable_hosts(); |
| 149 host->Send(new ExtensionMsg_UpdatePermissions(info)); | 149 host->Send(new ExtensionMsg_UpdatePermissions(info)); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 // Trigger the onAdded and onRemoved events in the extension. | 153 // Trigger the onAdded and onRemoved events in the extension. |
| 154 DispatchEvent(extension->id(), event_name, changed); | 154 DispatchEvent(extension->id(), event_name, changed); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace extensions | 157 } // namespace extensions |
| OLD | NEW |