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

Side by Side Diff: content/browser/media/android/provision_fetcher_impl.h

Issue 1466633002: media: Add ProvisionFetcher mojo interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix std::move use Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_PROVISION_FETCHER_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_PROVISION_FETCHER_IMPL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "content/public/browser/android/provision_fetcher_factory.h"
12 #include "media/base/android/provision_fetcher.h"
13 #include "media/mojo/interfaces/provision_fetcher.mojom.h"
14 #include "mojo/public/cpp/bindings/strong_binding.h"
15
16 namespace content {
17
18 class RenderFrameHost;
19
20 // An media::interfaces::ProvisionFetcher implementation based on
21 // media::ProvisionFetcher.
22 class ProvisionFetcherImpl : public media::interfaces::ProvisionFetcher {
23 public:
24 static void Create(
25 RenderFrameHost* render_frame_host,
26 mojo::InterfaceRequest<media::interfaces::ProvisionFetcher> request);
27
28 ProvisionFetcherImpl(scoped_ptr<media::ProvisionFetcher> provision_fetcher,
29 mojo::InterfaceRequest<ProvisionFetcher> request);
30 ~ProvisionFetcherImpl() override;
31
32 // media::interfaces::ProvisionFetcher implementation.
33 void Retrieve(const mojo::String& default_url,
34 const mojo::String& request_data,
35 const RetrieveCallback& callback) final;
36
37 private:
38 // Callback for media::ProvisionFetcher::Retrieve().
39 void OnResponse(const RetrieveCallback& callback,
40 bool success,
41 const std::string& response);
42
43 mojo::StrongBinding<media::interfaces::ProvisionFetcher> binding_;
44 scoped_ptr<media::ProvisionFetcher> provision_fetcher_;
45
46 base::WeakPtrFactory<ProvisionFetcherImpl> weak_factory_;
47
48 DISALLOW_COPY_AND_ASSIGN(ProvisionFetcherImpl);
49 };
50
51 } // namespace content
52
53 #endif // CONTENT_BROWSER_MEDIA_ANDROID_PROVISION_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_mojo_shell.cc ('k') | content/browser/media/android/provision_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698