Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / media / mojo / services / mojo_media_application.h
blob3233e03d2f480aceec18c396b18782f7c934dae7
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
3 // found in the LICENSE file.
5 #include "base/memory/ref_counted.h"
6 #include "media/mojo/interfaces/service_factory.mojom.h"
7 #include "mojo/application/public/cpp/application_delegate.h"
8 #include "mojo/application/public/cpp/interface_factory_impl.h"
9 #include "url/gurl.h"
11 namespace media {
13 class MediaLog;
15 class MojoMediaApplication
16 : public mojo::ApplicationDelegate,
17 public mojo::InterfaceFactory<interfaces::ServiceFactory> {
18 public:
19 static GURL AppUrl();
20 static scoped_ptr<mojo::ApplicationDelegate> CreateApp();
22 MojoMediaApplication();
23 ~MojoMediaApplication() final;
25 private:
26 // mojo::ApplicationDelegate implementation.
27 void Initialize(mojo::ApplicationImpl* app) final;
28 bool ConfigureIncomingConnection(
29 mojo::ApplicationConnection* connection) final;
31 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation.
32 void Create(mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<interfaces::ServiceFactory> request) final;
35 mojo::ApplicationImpl* app_impl_;
36 scoped_refptr<MediaLog> media_log_;
39 } // namespace media