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

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

Issue 2026623002: views/mus: Have explicit ownership of views::WindowManagerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/browser/browser.h" 5 #include "mash/browser/browser.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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 base::MessageLoop::current()->QuitWhenIdle(); 327 base::MessageLoop::current()->QuitWhenIdle();
328 } 328 }
329 329
330 void Browser::Initialize(shell::Connector* connector, 330 void Browser::Initialize(shell::Connector* connector,
331 const shell::Identity& identity, 331 const shell::Identity& identity,
332 uint32_t id) { 332 uint32_t id) {
333 connector_ = connector; 333 connector_ = connector;
334 tracing_.Initialize(connector, identity.name()); 334 tracing_.Initialize(connector, identity.name());
335 335
336 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 336 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
337 views::WindowManagerConnection::Create(connector, identity); 337 views_mus_ = views::WindowManagerConnection::Create(connector, identity);
338 } 338 }
339 339
340 bool Browser::AcceptConnection(shell::Connection* connection) { 340 bool Browser::AcceptConnection(shell::Connection* connection) {
341 connection->AddInterface<mojom::Launchable>(this); 341 connection->AddInterface<mojom::Launchable>(this);
342 return true; 342 return true;
343 } 343 }
344 344
345 void Browser::Launch(uint32_t what, mojom::LaunchMode how) { 345 void Browser::Launch(uint32_t what, mojom::LaunchMode how) {
346 bool reuse = 346 bool reuse =
347 how == mojom::LaunchMode::REUSE || how == mojom::LaunchMode::DEFAULT; 347 how == mojom::LaunchMode::REUSE || how == mojom::LaunchMode::DEFAULT;
(...skipping 18 matching lines...) Expand all
366 AddWindow(window); 366 AddWindow(window);
367 } 367 }
368 368
369 void Browser::Create(shell::Connection* connection, 369 void Browser::Create(shell::Connection* connection,
370 mojom::LaunchableRequest request) { 370 mojom::LaunchableRequest request) {
371 bindings_.AddBinding(this, std::move(request)); 371 bindings_.AddBinding(this, std::move(request));
372 } 372 }
373 373
374 } // namespace browser 374 } // namespace browser
375 } // namespace mash 375 } // namespace mash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698