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 0ac149fb4af63c17eb62f7a640b20d9c4e280390..10ef9f26f2ed5d172f7cb47a0d796febdbf1492e 100644 |
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.h |
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h |
@@ -9,6 +9,7 @@ |
#include <string> |
#include "base/scoped_observer.h" |
+#include "extensions/browser/api/async_api_function.h" |
#include "extensions/browser/browser_context_keyed_api_factory.h" |
#include "extensions/browser/extension_function.h" |
#include "extensions/browser/extension_registry_observer.h" |
@@ -35,6 +36,9 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI, |
scoped_ptr<content::StreamHandle> stream, |
int64 expected_content_size); |
+ void AbortStream(const std::string& extension_id, |
+ const GURL& stream_url); |
+ |
// BrowserContextKeyedAPI implementation. |
static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance(); |
@@ -66,6 +70,22 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI, |
extension_registry_observer_; |
}; |
+class StreamsPrivateAbortFunction : public AsyncApiFunction { |
Zachary Kuznia
2014/05/15 13:43:27
Is there a reason you don't derive from SyncExtens
raymes
2014/05/16 01:09:19
Done.
|
+ public: |
+ StreamsPrivateAbortFunction(); |
+ DECLARE_EXTENSION_FUNCTION("streamsPrivate.abort", STREAMSPRIVATE_ABORT) |
+ |
+ protected: |
+ virtual ~StreamsPrivateAbortFunction() {} |
+ |
+ // AsyncApiFunction: |
+ virtual bool Prepare() OVERRIDE; |
+ virtual bool Respond() OVERRIDE; |
+ |
+ private: |
+ std::string stream_url_; |
+}; |
+ |
} // namespace extensions |
#endif // CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ |