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

Side by Side Diff: chromecast/browser/media/cast_mojo_media_application.h

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_ 5 #ifndef CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_
6 #define CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_ 6 #define CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "media/mojo/interfaces/service_factory.mojom.h" 11 #include "media/mojo/interfaces/service_factory.mojom.h"
12 #include "services/shell/public/cpp/interface_factory.h" 12 #include "services/shell/public/cpp/interface_factory.h"
13 #include "services/shell/public/cpp/message_loop_ref.h" 13 #include "services/shell/public/cpp/message_loop_ref.h"
14 #include "services/shell/public/cpp/shell_client.h" 14 #include "services/shell/public/cpp/shell_client.h"
15 15
16 namespace base { 16 namespace base {
17 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
18 } // namespace base 18 } // namespace base
19 19
20 namespace media { 20 namespace media {
21 class MediaLog; 21 class MediaLog;
22 } // namespace media 22 } // namespace media
23 23
24 namespace chromecast { 24 namespace chromecast {
25 namespace media { 25 namespace media {
26 26
27 class CastMojoMediaClient; 27 class CastMojoMediaClient;
28 28
29 class CastMojoMediaApplication 29 class CastMojoMediaApplication
30 : public mojo::ShellClient, 30 : public shell::ShellClient,
31 public mojo::InterfaceFactory<::media::interfaces::ServiceFactory> { 31 public shell::InterfaceFactory<::media::interfaces::ServiceFactory> {
32 public: 32 public:
33 CastMojoMediaApplication( 33 CastMojoMediaApplication(
34 std::unique_ptr<CastMojoMediaClient> mojo_media_client, 34 std::unique_ptr<CastMojoMediaClient> mojo_media_client,
35 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner); 35 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner);
36 ~CastMojoMediaApplication() final; 36 ~CastMojoMediaApplication() final;
37 37
38 private: 38 private:
39 // mojo::ShellClient implementation. 39 // shell::ShellClient implementation.
40 void Initialize(mojo::Connector* connector, 40 void Initialize(shell::Connector* connector,
41 const mojo::Identity& identity, 41 const shell::Identity& identity,
42 uint32_t id) final; 42 uint32_t id) final;
43 bool AcceptConnection(mojo::Connection* connection) final; 43 bool AcceptConnection(shell::Connection* connection) final;
44 44
45 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation. 45 // shell::InterfaceFactory<interfaces::ServiceFactory> implementation.
46 void Create(mojo::Connection* connection, 46 void Create(shell::Connection* connection,
47 mojo::InterfaceRequest<::media::interfaces::ServiceFactory> 47 mojo::InterfaceRequest<::media::interfaces::ServiceFactory>
48 request) final; 48 request) final;
49 49
50 std::unique_ptr<CastMojoMediaClient> mojo_media_client_; 50 std::unique_ptr<CastMojoMediaClient> mojo_media_client_;
51 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 51 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
52 scoped_refptr<::media::MediaLog> media_log_; 52 scoped_refptr<::media::MediaLog> media_log_;
53 mojo::MessageLoopRefFactory ref_factory_; 53 shell::MessageLoopRefFactory ref_factory_;
54 }; 54 };
55 55
56 } // namespace media 56 } // namespace media
57 } // namespace chromecast 57 } // namespace chromecast
58 58
59 #endif // CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_ 59 #endif // CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | chromecast/browser/media/cast_mojo_media_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698