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

Side by Side Diff: media/mojo/services/mojo_media_application.h

Issue 1769163002: Add a instance groups to Connect(), and introduce an Identity struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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
« no previous file with comments | « mash/wm/window_manager_application.cc ('k') | media/mojo/services/mojo_media_application.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/mojo/interfaces/service_factory.mojom.h" 10 #include "media/mojo/interfaces/service_factory.mojom.h"
(...skipping 10 matching lines...) Expand all
21 class MojoMediaApplication 21 class MojoMediaApplication
22 : public mojo::ShellClient, 22 : public mojo::ShellClient,
23 public mojo::InterfaceFactory<interfaces::ServiceFactory> { 23 public mojo::InterfaceFactory<interfaces::ServiceFactory> {
24 public: 24 public:
25 explicit MojoMediaApplication(scoped_ptr<MojoMediaClient> mojo_media_client); 25 explicit MojoMediaApplication(scoped_ptr<MojoMediaClient> mojo_media_client);
26 ~MojoMediaApplication() final; 26 ~MojoMediaApplication() final;
27 27
28 private: 28 private:
29 // mojo::ShellClient implementation. 29 // mojo::ShellClient implementation.
30 void Initialize(mojo::Connector* connector, 30 void Initialize(mojo::Connector* connector,
31 const std::string& url, 31 const mojo::Identity& identity,
32 const std::string& user_id,
33 uint32_t id) final; 32 uint32_t id) final;
34 bool AcceptConnection(mojo::Connection* connection) final; 33 bool AcceptConnection(mojo::Connection* connection) final;
35 34
36 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation. 35 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation.
37 void Create(mojo::Connection* connection, 36 void Create(mojo::Connection* connection,
38 mojo::InterfaceRequest<interfaces::ServiceFactory> request) final; 37 mojo::InterfaceRequest<interfaces::ServiceFactory> request) final;
39 38
40 // Note: Since each instance runs on a different thread, do not share a common 39 // Note: Since each instance runs on a different thread, do not share a common
41 // MojoMediaClient with other instances to avoid threading issues. Hence using 40 // MojoMediaClient with other instances to avoid threading issues. Hence using
42 // a scoped_ptr here. 41 // a scoped_ptr here.
43 scoped_ptr<MojoMediaClient> mojo_media_client_; 42 scoped_ptr<MojoMediaClient> mojo_media_client_;
44 43
45 mojo::Connector* connector_; 44 mojo::Connector* connector_;
46 scoped_refptr<MediaLog> media_log_; 45 scoped_refptr<MediaLog> media_log_;
47 mojo::MessageLoopRefFactory ref_factory_; 46 mojo::MessageLoopRefFactory ref_factory_;
48 }; 47 };
49 48
50 } // namespace media 49 } // namespace media
51 50
52 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ 51 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_
OLDNEW
« no previous file with comments | « mash/wm/window_manager_application.cc ('k') | media/mojo/services/mojo_media_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698