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

Unified Diff: content/browser/media/android/url_provision_fetcher.h

Issue 1427183002: Move MediaDrmBridge provision communication to native side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For on-demand provisioning the fetcher is created in content/ and depends on the renderer. Created 5 years, 1 month 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: content/browser/media/android/url_provision_fetcher.h
diff --git a/content/browser/media/android/url_provision_fetcher.h b/content/browser/media/android/url_provision_fetcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..40916cee08986f5f4fd66e7677429a65f1b20e00
--- /dev/null
+++ b/content/browser/media/android/url_provision_fetcher.h
@@ -0,0 +1,50 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_MEDIA_ANDROID_URL_PROVISION_FETCHER_H_
xhwang 2015/11/06 23:08:18 tip: when moving file around, first upload a PS th
Tima Vaisburd 2015/11/11 03:03:34 Acknowledged.
+#define CONTENT_BROWSER_MEDIA_ANDROID_URL_PROVISION_FETCHER_H_
+
+#include "base/macros.h"
+#include "media/base/provision_fetcher.h"
+#include "net/url_request/url_fetcher.h"
+#include "net/url_request/url_fetcher_delegate.h"
+
+namespace content {
+
+// The ProvisionFetcher that retrieves the data by HTTP POST request.
+
+class URLProvisionFetcher : public media::ProvisionFetcher,
xhwang 2015/11/06 23:08:18 nit: All ProvisionFetch will use a URL, so it seem
Tima Vaisburd 2015/11/11 03:03:33 I thought we will have another implementation for
xhwang 2015/11/11 09:53:21 Yes, I'll need one in the GPU process. That can be
Tima Vaisburd 2015/11/11 23:26:35 Shall we keep URLProvisionFetcher then? Or change
xhwang 2015/11/12 22:27:03 I really have no preference. Now "URL" seems okay
Tima Vaisburd 2015/11/13 03:13:10 kept current name.
+ private net::URLFetcherDelegate {
xhwang 2015/11/06 23:08:18 style: We don't use private inheritance. https://
Tima Vaisburd 2015/11/11 03:03:34 Just changed to public, but, as the link says, I d
xhwang 2015/11/11 09:53:21 There are 117 cases where net::URLFetcherDelegate
Tima Vaisburd 2015/11/11 23:26:35 Acknowledged.
+ public:
+ explicit URLProvisionFetcher(net::URLRequestContextGetter* context);
+ ~URLProvisionFetcher() override;
+
+ // media::ProvisionFetcher implementation.
+ void Retrieve(const std::string& default_url,
+ const std::string& request_data,
+ const media::ProvisionFetcher::ResponseCB& cb) override;
xhwang 2015/11/06 23:08:18 nit: cb/response_cb/
xhwang 2015/11/06 23:08:18 s/media::ProvisionFetcher::// since |this| is a me
Tima Vaisburd 2015/11/11 23:26:35 Done.
Tima Vaisburd 2015/11/11 23:26:35 Done.
+
+ private:
+ // net::URLFetcherDelegate implementation.
+ void OnURLFetchComplete(const net::URLFetcher* source) override;
+
+ net::URLRequestContextGetter* url_request_context_;
+ scoped_ptr<net::URLFetcher> request_;
+ media::ProvisionFetcher::ResponseCB response_cb_;
+
+ DISALLOW_COPY_AND_ASSIGN(URLProvisionFetcher);
+};
+
+/*
+// A factory that creates URLProvisionFetcher objects.
+
+class URLProvisionFetcherFactory : public media::ProvisionFetcherFactory {
+ public:
+ scoped_ptr<media::ProvisionFetcher> CreateFetcher(
+ int render_process_id) const override;
+};
+*/
xhwang 2015/11/06 23:08:18 remove
Tima Vaisburd 2015/11/11 03:03:33 Done.
+} // namespace content
+
+#endif // CHROME_BROWSER_MEDIA_ANDROID_URL_PROVISION_FETCHER_H_

Powered by Google App Engine
This is Rietveld 408576698