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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 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 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 "ash/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void WindowManager::Init( 101 void WindowManager::Init(
102 std::unique_ptr<aura::WindowTreeClient> window_tree_client, 102 std::unique_ptr<aura::WindowTreeClient> window_tree_client,
103 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool) { 103 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool) {
104 DCHECK(window_manager_client_); 104 DCHECK(window_manager_client_);
105 DCHECK(!window_tree_client_); 105 DCHECK(!window_tree_client_);
106 window_tree_client_ = std::move(window_tree_client); 106 window_tree_client_ = std::move(window_tree_client);
107 107
108 aura::Env::GetInstance()->AddObserver(this); 108 aura::Env::GetInstance()->AddObserver(this);
109 109
110 // |connector_| will be null in some tests. 110 // |connector_| will be null in some tests.
111 if (connector_) { 111 if (connector_)
112 connector_->ConnectToInterface(ui::mojom::kServiceName, 112 connector_->BindInterface(ui::mojom::kServiceName, &display_controller_);
113 &display_controller_);
114 }
115 113
116 screen_ = base::MakeUnique<ScreenMus>(); 114 screen_ = base::MakeUnique<ScreenMus>();
117 display::Screen::SetScreenInstance(screen_.get()); 115 display::Screen::SetScreenInstance(screen_.get());
118 116
119 pointer_watcher_event_router_ = 117 pointer_watcher_event_router_ =
120 base::MakeUnique<views::PointerWatcherEventRouter>( 118 base::MakeUnique<views::PointerWatcherEventRouter>(
121 window_tree_client_.get()); 119 window_tree_client_.get());
122 120
123 shadow_controller_ = base::MakeUnique<ShadowController>(); 121 shadow_controller_ = base::MakeUnique<ShadowController>();
124 122
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 496
499 void WindowManager::OnWindowInitialized(aura::Window* window) { 497 void WindowManager::OnWindowInitialized(aura::Window* window) {
500 // This ensures WmWindowAura won't be called before WmWindowMus. This is 498 // This ensures WmWindowAura won't be called before WmWindowMus. This is
501 // important as if WmWindowAura::Get() is called first, then WmWindowAura 499 // important as if WmWindowAura::Get() is called first, then WmWindowAura
502 // would be created, not WmWindowMus. 500 // would be created, not WmWindowMus.
503 WmWindowMus::Get(window); 501 WmWindowMus::Get(window);
504 } 502 }
505 503
506 } // namespace mus 504 } // namespace mus
507 } // namespace ash 505 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/keyboard_ui_mus.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698