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

Side by Side Diff: mash/webtest/webtest.cc

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review Created 4 years 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 | « mash/task_viewer/task_viewer.cc ('k') | media/remoting/fake_remoting_controller.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 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 "mash/webtest/webtest.h" 5 #include "mash/webtest/webtest.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 how == mojom::LaunchMode::DEFAULT; 184 how == mojom::LaunchMode::DEFAULT;
185 if (reuse && !windows_.empty()) { 185 if (reuse && !windows_.empty()) {
186 windows_.back()->Activate(); 186 windows_.back()->Activate();
187 return; 187 return;
188 } 188 }
189 189
190 navigation::mojom::ViewFactoryPtr view_factory; 190 navigation::mojom::ViewFactoryPtr view_factory;
191 context()->connector()->ConnectToInterface("navigation", &view_factory); 191 context()->connector()->ConnectToInterface("navigation", &view_factory);
192 navigation::mojom::ViewPtr view; 192 navigation::mojom::ViewPtr view;
193 navigation::mojom::ViewClientPtr view_client; 193 navigation::mojom::ViewClientPtr view_client;
194 navigation::mojom::ViewClientRequest view_client_request = 194 navigation::mojom::ViewClientRequest view_client_request(&view_client);
195 MakeRequest(&view_client);
196 view_factory->CreateView(std::move(view_client), MakeRequest(&view)); 195 view_factory->CreateView(std::move(view_client), MakeRequest(&view));
197 UI* ui = new UI(this, std::move(view), std::move(view_client_request)); 196 UI* ui = new UI(this, std::move(view), std::move(view_client_request));
198 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( 197 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
199 ui, nullptr, gfx::Rect(50, 10, 600, 600)); 198 ui, nullptr, gfx::Rect(50, 10, 600, 600));
200 ui->NavigateTo(GURL("http://www.theverge.com/")); 199 ui->NavigateTo(GURL("http://www.theverge.com/"));
201 window->Show(); 200 window->Show();
202 AddWindow(window); 201 AddWindow(window);
203 } 202 }
204 203
205 void Webtest::Create(const service_manager::Identity& remote_identity, 204 void Webtest::Create(const service_manager::Identity& remote_identity,
206 mojom::LaunchableRequest request) { 205 mojom::LaunchableRequest request) {
207 bindings_.AddBinding(this, std::move(request)); 206 bindings_.AddBinding(this, std::move(request));
208 } 207 }
209 208
210 } // namespace webtest 209 } // namespace webtest
211 } // namespace mash 210 } // namespace mash
OLDNEW
« no previous file with comments | « mash/task_viewer/task_viewer.cc ('k') | media/remoting/fake_remoting_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698