| Index: chrome/browser/extensions/api/streams_private/streams_private_api.h
|
| diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.h b/chrome/browser/extensions/api/streams_private/streams_private_api.h
|
| index 36f560d1b9475a1d6be61283930e7ae396c88276..e792c91cb55e44c0c0d40ecb409575955196cfbb 100644
|
| --- a/chrome/browser/extensions/api/streams_private/streams_private_api.h
|
| +++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h
|
| @@ -19,18 +19,37 @@
|
|
|
| class Profile;
|
|
|
| +namespace content {
|
| +class StreamHandle;
|
| +}
|
| +
|
| namespace extensions {
|
|
|
| -class StreamsPrivateAPI : public ProfileKeyedAPI {
|
| +class StreamsPrivateAPI : public ProfileKeyedAPI,
|
| + public content::NotificationObserver {
|
| public:
|
| + // Convenience method to get the StreamsPrivateAPI for a profile.
|
| + static StreamsPrivateAPI* Get(Profile* profile);
|
| +
|
| explicit StreamsPrivateAPI(Profile* profile);
|
| virtual ~StreamsPrivateAPI();
|
|
|
| + void ExecuteMimeTypeHandler(const std::string& extension_id,
|
| + scoped_ptr<content::StreamHandle> stream);
|
| +
|
| // ProfileKeyedAPI implementation.
|
| static ProfileKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance();
|
|
|
| + // content::NotificationObserver implementation.
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| private:
|
| friend class ProfileKeyedAPIFactory<StreamsPrivateAPI>;
|
| + typedef std::map<std::string,
|
| + std::map<GURL,
|
| + linked_ptr<content::StreamHandle> > > StreamMap;
|
|
|
| // ProfileKeyedAPI implementation.
|
| static const char* service_name() {
|
| @@ -39,6 +58,9 @@ class StreamsPrivateAPI : public ProfileKeyedAPI {
|
| static const bool kServiceIsNULLWhileTesting = true;
|
|
|
| Profile* const profile_;
|
| + content::NotificationRegistrar registrar_;
|
| + StreamMap streams_;
|
| + base::WeakPtrFactory<StreamsPrivateAPI> weak_ptr_factory_;
|
| };
|
|
|
| } // namespace extensions
|
|
|