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

Side by Side Diff: mojo/ui/view_provider_app.cc

Issue 2001283002: Remove ViewProvider.CreateView()'s exposed_services. (Closed) Base URL: https://github.com/domokit/mojo.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
« no previous file with comments | « mojo/ui/view_provider_app.h ('k') | services/ui/launcher/launch_instance.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 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 #include "mojo/ui/view_provider_app.h" 5 #include "mojo/ui/view_provider_app.h"
6 6
7 #include <utility>
8
9 #include "base/command_line.h" 7 #include "base/command_line.h"
10 #include "base/logging.h" 8 #include "base/logging.h"
11 9
12 namespace mojo { 10 namespace mojo {
13 namespace ui { 11 namespace ui {
14 12
15 class ViewProviderApp::DelegatingViewProvider : public mojo::ui::ViewProvider { 13 class ViewProviderApp::DelegatingViewProvider : public mojo::ui::ViewProvider {
16 public: 14 public:
17 DelegatingViewProvider(ViewProviderApp* app, 15 DelegatingViewProvider(ViewProviderApp* app,
18 const std::string& view_provider_url) 16 const std::string& view_provider_url)
19 : app_(app), view_provider_url_(view_provider_url) {} 17 : app_(app), view_provider_url_(view_provider_url) {}
20 18
21 ~DelegatingViewProvider() override {} 19 ~DelegatingViewProvider() override {}
22 20
23 private: 21 private:
24 // |ViewProvider|: 22 // |ViewProvider|:
25 void CreateView( 23 void CreateView(
26 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 24 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
27 mojo::InterfaceRequest<mojo::ServiceProvider> services, 25 mojo::InterfaceRequest<mojo::ServiceProvider> services) override {
28 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override {
29 app_->CreateView(this, view_provider_url_, view_owner_request.Pass(), 26 app_->CreateView(this, view_provider_url_, view_owner_request.Pass(),
30 services.Pass(), std::move(exposed_services)); 27 services.Pass());
31 } 28 }
32 29
33 ViewProviderApp* app_; 30 ViewProviderApp* app_;
34 std::string view_provider_url_; 31 std::string view_provider_url_;
35 32
36 MOJO_DISALLOW_COPY_AND_ASSIGN(DelegatingViewProvider); 33 MOJO_DISALLOW_COPY_AND_ASSIGN(DelegatingViewProvider);
37 }; 34 };
38 35
39 ViewProviderApp::ViewProviderApp() {} 36 ViewProviderApp::ViewProviderApp() {}
40 37
(...skipping 18 matching lines...) Expand all
59 new DelegatingViewProvider(this, connection_context.connection_url), 56 new DelegatingViewProvider(this, connection_context.connection_url),
60 view_provider_request.Pass()); 57 view_provider_request.Pass());
61 }); 58 });
62 return true; 59 return true;
63 } 60 }
64 61
65 void ViewProviderApp::CreateView( 62 void ViewProviderApp::CreateView(
66 DelegatingViewProvider* provider, 63 DelegatingViewProvider* provider,
67 const std::string& view_provider_url, 64 const std::string& view_provider_url,
68 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 65 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
69 mojo::InterfaceRequest<mojo::ServiceProvider> services, 66 mojo::InterfaceRequest<mojo::ServiceProvider> services) {
70 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) { 67 CreateView(view_provider_url, view_owner_request.Pass(), services.Pass());
71 CreateView(view_provider_url, view_owner_request.Pass(), services.Pass(),
72 exposed_services.Pass());
73 } 68 }
74 69
75 } // namespace ui 70 } // namespace ui
76 } // namespace mojo 71 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/ui/view_provider_app.h ('k') | services/ui/launcher/launch_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698