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

Side by Side Diff: examples/ui/tile/tile_app.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: delay InterfacePtr::Create() until you actually need an InterfacePtr. GetProxy() and ConnectToAppl… Created 4 years, 10 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 #include <vector> 5 #include <vector>
6 6
7 #include "base/strings/string_split.h" 7 #include "base/strings/string_split.h"
8 #include "examples/ui/tile/tile_app.h" 8 #include "examples/ui/tile/tile_app.h"
9 #include "examples/ui/tile/tile_view.h" 9 #include "examples/ui/tile/tile_view.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 namespace examples { 12 namespace examples {
13 13
14 TileApp::TileApp() {} 14 TileApp::TileApp() {}
15 15
16 TileApp::~TileApp() {} 16 TileApp::~TileApp() {}
17 17
18 bool TileApp::CreateView( 18 bool TileApp::CreateView(
19 const std::string& connection_url, 19 const std::string& connection_url,
20 mojo::InterfaceRequest<mojo::ServiceProvider> services, 20 mojo::InterfaceRequest<mojo::ServiceProvider> services,
21 mojo::ServiceProviderPtr exposed_services, 21 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services,
22 const mojo::ui::ViewProvider::CreateViewCallback& callback) { 22 const mojo::ui::ViewProvider::CreateViewCallback& callback) {
23 GURL url(connection_url); 23 GURL url(connection_url);
24 std::vector<std::string> view_urls; 24 std::vector<std::string> view_urls;
25 base::SplitString(url.query(), ',', &view_urls); 25 base::SplitString(url.query(), ',', &view_urls);
26 26
27 if (view_urls.empty()) { 27 if (view_urls.empty()) {
28 LOG(ERROR) << "Must supply comma-delimited URLs of mojo views to tile as a " 28 LOG(ERROR) << "Must supply comma-delimited URLs of mojo views to tile as a "
29 "query parameter."; 29 "query parameter.";
30 return false; 30 return false;
31 } 31 }
32 32
33 new TileView(app_impl(), view_urls, callback); 33 new TileView(app_impl(), view_urls, callback);
34 return true; 34 return true;
35 } 35 }
36 36
37 } // namespace examples 37 } // namespace examples
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698