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

Side by Side Diff: services/ui/ws/display.cc

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Addressing most feedback, making this work on device. Created 3 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 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 "services/ui/ws/display.h" 5 #include "services/ui/ws/display.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 } 65 }
66 66
67 void Display::Init(const display::ViewportMetrics& metrics, 67 void Display::Init(const display::ViewportMetrics& metrics,
68 std::unique_ptr<DisplayBinding> binding) { 68 std::unique_ptr<DisplayBinding> binding) {
69 binding_ = std::move(binding); 69 binding_ = std::move(binding);
70 display_manager()->AddDisplay(this); 70 display_manager()->AddDisplay(this);
71 71
72 CreateRootWindow(metrics.bounds_in_pixels.size()); 72 CreateRootWindow(metrics.bounds_in_pixels.size());
73 73
74 platform_display_ = PlatformDisplay::Create(root_.get(), metrics); 74 platform_display_ = PlatformDisplay::Create(
75 root_.get(), metrics, window_server_->resource_runner());
75 platform_display_->Init(this); 76 platform_display_->Init(this);
76 } 77 }
77 78
78 int64_t Display::GetId() const { 79 int64_t Display::GetId() const {
79 // TODO(tonikitoo): Implement a different ID for external window mode. 80 // TODO(tonikitoo): Implement a different ID for external window mode.
80 return display_.id(); 81 return display_.id();
81 } 82 }
82 83
83 void Display::SetDisplay(const display::Display& display) { 84 void Display::SetDisplay(const display::Display& display) {
84 display_ = display; 85 display_ = display;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 414
414 UserActivityMonitor* activity_monitor = 415 UserActivityMonitor* activity_monitor =
415 window_server_->GetUserActivityMonitorForUser( 416 window_server_->GetUserActivityMonitorForUser(
416 window_server_->user_id_tracker()->active_id()); 417 window_server_->user_id_tracker()->active_id());
417 activity_monitor->OnUserActivity(); 418 activity_monitor->OnUserActivity();
418 return EventDispatchDetails(); 419 return EventDispatchDetails();
419 } 420 }
420 421
421 } // namespace ws 422 } // namespace ws
422 } // namespace ui 423 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698