Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Unified Diff: chrome/browser/extensions/api/streams_private/streams_private_api.h

Issue 281513003: Implement chrome.streamsPrivate.abort() extensions function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d1375814682893cd86edaab35eb376da0bd0365e 100644
--- a/chrome/browser/extensions/api/streams_private/streams_private_api.h
+++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h
@@ -35,6 +35,10 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
scoped_ptr<content::StreamHandle> stream,
int64 expected_content_size);
+ void AbortStream(const std::string& extension_id,
+ const GURL& stream_url,
+ const base::Closure& callback);
+
// BrowserContextKeyedAPI implementation.
static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance();
@@ -66,6 +70,23 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
extension_registry_observer_;
};
+class StreamsPrivateAbortFunction : public UIThreadExtensionFunction {
+ public:
+ StreamsPrivateAbortFunction();
+ DECLARE_EXTENSION_FUNCTION("streamsPrivate.abort", STREAMSPRIVATE_ABORT)
+
+ protected:
+ virtual ~StreamsPrivateAbortFunction() {}
+
+ // ExtensionFunction:
+ virtual ExtensionFunction::ResponseAction Run() OVERRIDE;
+
+ private:
+ void OnClose();
+
+ std::string stream_url_;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_

Powered by Google App Engine
This is Rietveld 408576698