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

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

Issue 2367393002: Migrating MediaSession messages to mojo (Closed)
Patch Set: fix build Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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_MEDIA_SESSION_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
7
8 #include "mojo/public/cpp/bindings/binding.h"
9 #include "third_party/WebKit/public/platform/modules/mediasession/media_session. mojom.h"
10
11 namespace content {
12
13 class RenderFrameHost;
14
15 class MediaSessionServiceImpl
16 : public NON_EXPORTED_BASE(blink::mojom::MediaSessionService) {
17 public:
18 ~MediaSessionServiceImpl() override;
19
20 static void Create(
21 RenderFrameHost* render_frame_host,
22 blink::mojom::MediaSessionServiceRequest request);
23
24 private:
25 MediaSessionServiceImpl(RenderFrameHost* render_frame_host);
26
27 void Activate(uint64_t session_id,
28 const ActivateCallback& callback) override;
29 void Deactivate(uint64_t session_id,
30 const DeactivateCallback& callback) override;
31 void SetMetadata(uint64_t session_id,
32 blink::mojom::MediaMetadataPtr metadata) override;
33
34 void Bind(mojo::InterfaceRequest<blink::mojom::MediaSessionService> request);
35
36 RenderFrameHost* render_frame_host_;
37
38 // RAII binding of |this| to an MediaSession interface request.
39 // The binding is removed when binding_ is cleared or goes out of scope.
40 std::unique_ptr<mojo::Binding<blink::mojom::MediaSessionService>> binding_;
41
42 DISALLOW_COPY_AND_ASSIGN(MediaSessionServiceImpl);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698