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

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

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 | « examples/spinning_cube/spinning_cube_app.cc ('k') | examples/wget/wget.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 "base/bind.h" 5 #include "base/bind.h"
6 #include "examples/ui/tile/tile_view.h" 6 #include "examples/ui/tile/tile_view.h"
7 #include "mojo/services/geometry/cpp/geometry_util.h" 7 #include "mojo/services/geometry/cpp/geometry_util.h"
8 8
9 namespace examples { 9 namespace examples {
10 10
(...skipping 22 matching lines...) Expand all
33 ConnectViews(); 33 ConnectViews();
34 } 34 }
35 35
36 TileView::~TileView() {} 36 TileView::~TileView() {}
37 37
38 void TileView::ConnectViews() { 38 void TileView::ConnectViews() {
39 uint32_t child_key = 0; 39 uint32_t child_key = 0;
40 for (const auto& url : params_.view_urls) { 40 for (const auto& url : params_.view_urls) {
41 // Start connecting to the view provider. 41 // Start connecting to the view provider.
42 mojo::ui::ViewProviderPtr provider; 42 mojo::ui::ViewProviderPtr provider;
43 app_impl()->ConnectToService(url, &provider); 43 app_impl()->ConnectToServiceDeprecated(url, &provider);
44 44
45 LOG(INFO) << "Connecting to view: child_key=" << child_key 45 LOG(INFO) << "Connecting to view: child_key=" << child_key
46 << ", url=" << url; 46 << ", url=" << url;
47 mojo::ui::ViewOwnerPtr child_view_owner; 47 mojo::ui::ViewOwnerPtr child_view_owner;
48 provider->CreateView(mojo::GetProxy(&child_view_owner), nullptr, nullptr); 48 provider->CreateView(mojo::GetProxy(&child_view_owner), nullptr, nullptr);
49 49
50 GetViewContainer()->AddChild(child_key, child_view_owner.Pass()); 50 GetViewContainer()->AddChild(child_key, child_view_owner.Pass());
51 views_.emplace(std::make_pair( 51 views_.emplace(std::make_pair(
52 child_key, std::unique_ptr<ViewData>(new ViewData(url, child_key)))); 52 child_key, std::unique_ptr<ViewData>(new ViewData(url, child_key))));
53 53
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 metadata->version = scene_version(); 252 metadata->version = scene_version();
253 scene()->Publish(metadata.Pass()); 253 scene()->Publish(metadata.Pass());
254 } 254 }
255 255
256 TileView::ViewData::ViewData(const std::string& url, uint32_t key) 256 TileView::ViewData::ViewData(const std::string& url, uint32_t key)
257 : url(url), key(key) {} 257 : url(url), key(key) {}
258 258
259 TileView::ViewData::~ViewData() {} 259 TileView::ViewData::~ViewData() {}
260 260
261 } // namespace examples 261 } // namespace examples
OLDNEW
« no previous file with comments | « examples/spinning_cube/spinning_cube_app.cc ('k') | examples/wget/wget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698