| 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/api/streams_private/streams_private_api.h" | 5 #include "chrome/browser/extensions/api/streams_private/streams_private_api.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
| 13 #include "chrome/browser/extensions/extension_function_registry.h" | 13 #include "chrome/browser/extensions/extension_function_registry.h" |
| 14 #include "chrome/browser/extensions/extension_system.h" | |
| 15 #include "chrome/browser/extensions/extension_tab_util.h" | 14 #include "chrome/browser/extensions/extension_tab_util.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 17 #include "content/public/browser/notification_details.h" | 16 #include "content/public/browser/notification_details.h" |
| 18 #include "content/public/browser/notification_source.h" | 17 #include "content/public/browser/notification_source.h" |
| 19 #include "content/public/browser/stream_handle.h" | 18 #include "content/public/browser/stream_handle.h" |
| 20 #include "extensions/browser/event_router.h" | 19 #include "extensions/browser/event_router.h" |
| 20 #include "extensions/browser/extension_system.h" |
| 21 | 21 |
| 22 namespace events { | 22 namespace events { |
| 23 | 23 |
| 24 const char kOnExecuteMimeTypeHandler[] = | 24 const char kOnExecuteMimeTypeHandler[] = |
| 25 "streamsPrivate.onExecuteMimeTypeHandler"; | 25 "streamsPrivate.onExecuteMimeTypeHandler"; |
| 26 | 26 |
| 27 } // namespace events | 27 } // namespace events |
| 28 | 28 |
| 29 namespace extensions { | 29 namespace extensions { |
| 30 | 30 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 void StreamsPrivateAPI::Observe(int type, | 83 void StreamsPrivateAPI::Observe(int type, |
| 84 const content::NotificationSource& source, | 84 const content::NotificationSource& source, |
| 85 const content::NotificationDetails& details) { | 85 const content::NotificationDetails& details) { |
| 86 if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { | 86 if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { |
| 87 const Extension* extension = | 87 const Extension* extension = |
| 88 content::Details<const UnloadedExtensionInfo>(details)->extension; | 88 content::Details<const UnloadedExtensionInfo>(details)->extension; |
| 89 streams_.erase(extension->id()); | 89 streams_.erase(extension->id()); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 } // namespace extensions | 92 } // namespace extensions |
| OLD | NEW |