| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 protected: | 150 protected: |
| 151 // ProcessManagerObserver: | 151 // ProcessManagerObserver: |
| 152 void OnBackgroundHostClose(const std::string& extension_id) override { | 152 void OnBackgroundHostClose(const std::string& extension_id) override { |
| 153 data_->InitiateExtensionSuspendedCleanup(extension_id); | 153 data_->InitiateExtensionSuspendedCleanup(extension_id); |
| 154 } | 154 } |
| 155 | 155 |
| 156 // ExtensionRegistryObserver: | 156 // ExtensionRegistryObserver: |
| 157 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 157 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 158 const Extension* extension, | 158 const Extension* extension, |
| 159 UnloadedExtensionInfo::Reason reason) override { | 159 UnloadedExtensionReason reason) override { |
| 160 data_->InitiateExtensionUnloadedCleanup(extension->id()); | 160 data_->InitiateExtensionUnloadedCleanup(extension->id()); |
| 161 } | 161 } |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 // TODO(rockot): ApiResourceData could be moved out of ApiResourceManager and | 164 // TODO(rockot): ApiResourceData could be moved out of ApiResourceManager and |
| 165 // we could avoid maintaining a friends list here. | 165 // we could avoid maintaining a friends list here. |
| 166 friend class BluetoothAPI; | 166 friend class BluetoothAPI; |
| 167 friend class CastChannelAsyncApiFunction; | 167 friend class CastChannelAsyncApiFunction; |
| 168 friend class api::BluetoothSocketApiFunction; | 168 friend class api::BluetoothSocketApiFunction; |
| 169 friend class api::BluetoothSocketEventDispatcher; | 169 friend class api::BluetoothSocketEventDispatcher; |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 ->GetSequencedTaskRunnerWithShutdownBehavior( | 420 ->GetSequencedTaskRunnerWithShutdownBehavior( |
| 421 content::BrowserThread::GetBlockingPool()->GetNamedSequenceToken( | 421 content::BrowserThread::GetBlockingPool()->GetNamedSequenceToken( |
| 422 T::kSequenceToken), | 422 T::kSequenceToken), |
| 423 T::kShutdownBehavior); | 423 T::kShutdownBehavior); |
| 424 } | 424 } |
| 425 }; | 425 }; |
| 426 | 426 |
| 427 } // namespace extensions | 427 } // namespace extensions |
| 428 | 428 |
| 429 #endif // EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_ | 429 #endif // EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_ |
| OLD | NEW |