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

Side by Side Diff: mandoline/ui/browser/merged_service_provider.h

Issue 1139123006: Fork the mojo shell interfaces used by Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_ 5 #ifndef MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_
6 #define MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_ 6 #define MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "mandoline/services/navigation/public/interfaces/navigation.mojom.h" 9 #include "mandoline/services/navigation/public/interfaces/navigation.mojom.h"
10 #include "third_party/mojo/src/mojo/public/cpp/application/interface_factory.h" 10 #include "mojo/application/public/cpp/interface_factory.h"
11 #include "mojo/application/public/interfaces/service_provider.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
12 #include "third_party/mojo/src/mojo/public/interfaces/application/service_provid er.mojom.h"
13 13
14 namespace mandoline { 14 namespace mandoline {
15 15
16 // Used to wrap the second incoming WindowManager Embed() "exposed_services" 16 // Used to wrap the second incoming WindowManager Embed() "exposed_services"
17 // parameter with a new ServiceProvider that adds the Browser's 17 // parameter with a new ServiceProvider that adds the Browser's
18 // NavigatorHost service. 18 // NavigatorHost service.
19 class MergedServiceProvider : public mojo::ServiceProvider { 19 class MergedServiceProvider : public mojo::ServiceProvider {
20 public: 20 public:
21 MergedServiceProvider(mojo::ServiceProviderPtr exposed_services, 21 MergedServiceProvider(mojo::ServiceProviderPtr exposed_services,
22 mojo::InterfaceFactory<mojo::NavigatorHost>* factory); 22 mojo::InterfaceFactory<mojo::NavigatorHost>* factory);
23 ~MergedServiceProvider() override; 23 ~MergedServiceProvider() override;
24 24
25 mojo::ServiceProviderPtr GetServiceProviderPtr(); 25 mojo::ServiceProviderPtr GetServiceProviderPtr();
26 26
27 private: 27 private:
28 // mojo::ServiceProvider: 28 // mojo::ServiceProvider:
29 void ConnectToService(const mojo::String& interface_name, 29 void ConnectToService(const mojo::String& interface_name,
30 mojo::ScopedMessagePipeHandle pipe) override; 30 mojo::ScopedMessagePipeHandle pipe) override;
31 31
32 mojo::ServiceProviderPtr exposed_services_; 32 mojo::ServiceProviderPtr exposed_services_;
33 mojo::InterfaceFactory<mojo::NavigatorHost>* factory_; 33 mojo::InterfaceFactory<mojo::NavigatorHost>* factory_;
34 scoped_ptr<mojo::Binding<ServiceProvider>> binding_; 34 scoped_ptr<mojo::Binding<ServiceProvider>> binding_;
35 35
36 DISALLOW_COPY_AND_ASSIGN(MergedServiceProvider); 36 DISALLOW_COPY_AND_ASSIGN(MergedServiceProvider);
37 }; 37 };
38 38
39 } // namespace mandoline 39 } // namespace mandoline
40 40
41 #endif // MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_ 41 #endif // MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698