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

Side by Side Diff: components/resource_provider/resource_provider_app.h

Issue 1942473002: Eliminate mojo:resource_provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 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 COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_
6 #define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_
7
8 #include <map>
9
10 #include "base/macros.h"
11 #include "components/resource_provider/public/interfaces/resource_provider.mojom .h"
12 #include "mojo/public/cpp/bindings/binding.h"
13 #include "mojo/public/cpp/bindings/binding_set.h"
14 #include "services/shell/public/cpp/interface_factory.h"
15 #include "services/shell/public/cpp/shell_client.h"
16 #include "services/tracing/public/cpp/tracing_impl.h"
17
18 namespace resource_provider {
19
20 class ResourceProviderApp : public shell::ShellClient,
21 public shell::InterfaceFactory<ResourceProvider> {
22 public:
23 explicit ResourceProviderApp(const std::string& resource_provider_app_url);
24 ~ResourceProviderApp() override;
25
26 private:
27 // shell::ShellClient:
28 void Initialize(shell::Connector* connector,
29 const shell::Identity& identity,
30 uint32_t id) override;
31 bool AcceptConnection(shell::Connection* connection) override;
32
33 // shell::InterfaceFactory<ResourceProvider>:
34 void Create(shell::Connection* connection,
35 mojo::InterfaceRequest<ResourceProvider> request) override;
36
37 mojo::TracingImpl tracing_;
38
39 mojo::BindingSet<ResourceProvider> bindings_;
40
41 // The name of the app that the resource provider code lives in. When using
42 // core services, it'll be the url of that. Otherwise it'll just be
43 // mojo:resource_provider.
44 std::string resource_provider_app_url_;
45
46 DISALLOW_COPY_AND_ASSIGN(ResourceProviderApp);
47 };
48
49 } // namespace resource_provider
50
51 #endif // COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698