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

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: 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/browser/browser.h ('k') | mash/catalog_viewer/catalog_viewer.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/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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 base::MessageLoop::current()->QuitWhenIdle(); 370 base::MessageLoop::current()->QuitWhenIdle();
371 } 371 }
372 372
373 void Browser::Initialize(shell::Connector* connector, 373 void Browser::Initialize(shell::Connector* connector,
374 const shell::Identity& identity, 374 const shell::Identity& identity,
375 uint32_t id) { 375 uint32_t id) {
376 connector_ = connector; 376 connector_ = connector;
377 tracing_.Initialize(connector, identity.name()); 377 tracing_.Initialize(connector, identity.name());
378 378
379 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 379 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
380 views::WindowManagerConnection::Create(connector, identity); 380 window_manager_connection_ =
381 views::WindowManagerConnection::Create(connector, identity);
381 } 382 }
382 383
383 bool Browser::AcceptConnection(shell::Connection* connection) { 384 bool Browser::AcceptConnection(shell::Connection* connection) {
384 connection->AddInterface<mojom::Launchable>(this); 385 connection->AddInterface<mojom::Launchable>(this);
385 return true; 386 return true;
386 } 387 }
387 388
388 void Browser::Launch(uint32_t what, mojom::LaunchMode how) { 389 void Browser::Launch(uint32_t what, mojom::LaunchMode how) {
389 bool reuse = 390 bool reuse =
390 how == mojom::LaunchMode::REUSE || how == mojom::LaunchMode::DEFAULT; 391 how == mojom::LaunchMode::REUSE || how == mojom::LaunchMode::DEFAULT;
(...skipping 18 matching lines...) Expand all
409 AddWindow(window); 410 AddWindow(window);
410 } 411 }
411 412
412 void Browser::Create(shell::Connection* connection, 413 void Browser::Create(shell::Connection* connection,
413 mojom::LaunchableRequest request) { 414 mojom::LaunchableRequest request) {
414 bindings_.AddBinding(this, std::move(request)); 415 bindings_.AddBinding(this, std::move(request));
415 } 416 }
416 417
417 } // namespace browser 418 } // namespace browser
418 } // namespace mash 419 } // namespace mash
OLDNEW
« no previous file with comments | « mash/browser/browser.h ('k') | mash/catalog_viewer/catalog_viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698