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

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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/streams_private/streams_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/streams_private/streams_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698