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

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

Issue 2026623002: views/mus: Have explicit ownership of views::WindowManagerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 6 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 | « mash/webtest/webtest.h ('k') | services/navigation/content_client/browser_main_parts.h » ('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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 base::MessageLoop::current()->QuitWhenIdle(); 148 base::MessageLoop::current()->QuitWhenIdle();
149 } 149 }
150 150
151 void Webtest::Initialize(shell::Connector* connector, 151 void Webtest::Initialize(shell::Connector* connector,
152 const shell::Identity& identity, 152 const shell::Identity& identity,
153 uint32_t id) { 153 uint32_t id) {
154 connector_ = connector; 154 connector_ = connector;
155 tracing_.Initialize(connector, identity.name()); 155 tracing_.Initialize(connector, identity.name());
156 156
157 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 157 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
158 views::WindowManagerConnection::Create(connector, identity); 158 window_manager_connection_ =
159 views::WindowManagerConnection::Create(connector, identity);
159 } 160 }
160 161
161 bool Webtest::AcceptConnection(shell::Connection* connection) { 162 bool Webtest::AcceptConnection(shell::Connection* connection) {
162 connection->AddInterface<mojom::Launchable>(this); 163 connection->AddInterface<mojom::Launchable>(this);
163 return true; 164 return true;
164 } 165 }
165 166
166 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) { 167 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) {
167 bool reuse = how == mojom::LaunchMode::REUSE || 168 bool reuse = how == mojom::LaunchMode::REUSE ||
168 how == mojom::LaunchMode::DEFAULT; 169 how == mojom::LaunchMode::DEFAULT;
(...skipping 17 matching lines...) Expand all
186 AddWindow(window); 187 AddWindow(window);
187 } 188 }
188 189
189 void Webtest::Create(shell::Connection* connection, 190 void Webtest::Create(shell::Connection* connection,
190 mojom::LaunchableRequest request) { 191 mojom::LaunchableRequest request) {
191 bindings_.AddBinding(this, std::move(request)); 192 bindings_.AddBinding(this, std::move(request));
192 } 193 }
193 194
194 } // namespace webtest 195 } // namespace webtest
195 } // namespace mash 196 } // namespace mash
OLDNEW
« no previous file with comments | « mash/webtest/webtest.h ('k') | services/navigation/content_client/browser_main_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698