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

Side by Side Diff: services/ui/launcher/launch_instance.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.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/launcher/launch_instance.h" 5 #include "services/ui/launcher/launch_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 23 matching lines...) Expand all
34 void LaunchInstance::Launch() { 34 void LaunchInstance::Launch() {
35 DVLOG(1) << "Launching " << app_url_; 35 DVLOG(1) << "Launching " << app_url_;
36 TRACE_EVENT0("launcher", __func__); 36 TRACE_EVENT0("launcher", __func__);
37 37
38 InitViewport(); 38 InitViewport();
39 39
40 mojo::ui::ViewProviderPtr client_view_provider; 40 mojo::ui::ViewProviderPtr client_view_provider;
41 mojo::ConnectToService(app_impl_->shell(), app_url_, 41 mojo::ConnectToService(app_impl_->shell(), app_url_,
42 GetProxy(&client_view_provider)); 42 GetProxy(&client_view_provider));
43 43
44 client_view_provider->CreateView(GetProxy(&client_view_owner_), nullptr, 44 client_view_provider->CreateView(GetProxy(&client_view_owner_), nullptr);
45 nullptr);
46 } 45 }
47 46
48 void LaunchInstance::InitViewport() { 47 void LaunchInstance::InitViewport() {
49 mojo::ConnectToService(app_impl_->shell(), "mojo:native_viewport_service", 48 mojo::ConnectToService(app_impl_->shell(), "mojo:native_viewport_service",
50 GetProxy(&viewport_)); 49 GetProxy(&viewport_));
51 viewport_.set_connection_error_handler(base::Bind( 50 viewport_.set_connection_error_handler(base::Bind(
52 &LaunchInstance::OnViewportConnectionError, base::Unretained(this))); 51 &LaunchInstance::OnViewportConnectionError, base::Unretained(this)));
53 52
54 mojo::NativeViewportEventDispatcherPtr dispatcher; 53 mojo::NativeViewportEventDispatcherPtr dispatcher;
55 viewport_event_dispatcher_binding_.Bind(GetProxy(&dispatcher)); 54 viewport_event_dispatcher_binding_.Bind(GetProxy(&dispatcher));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 98 }
100 99
101 void LaunchInstance::OnEvent(mojo::EventPtr event, 100 void LaunchInstance::OnEvent(mojo::EventPtr event,
102 const mojo::Callback<void()>& callback) { 101 const mojo::Callback<void()>& callback) {
103 if (view_tree_) 102 if (view_tree_)
104 view_tree_->DispatchEvent(event.Pass()); 103 view_tree_->DispatchEvent(event.Pass());
105 callback.Run(); 104 callback.Run();
106 } 105 }
107 106
108 } // namespace launcher 107 } // namespace launcher
OLDNEW
« no previous file with comments | « mojo/ui/view_provider_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698