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

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

Issue 2585633004: ozone: Allow ozone evdev/kvm features to be enabled without running on ChromeOS. (Closed)
Patch Set: fix bad rebase Created 4 years 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 "services/ui/display/screen_manager_ozone.h" 5 #include "services/ui/display/screen_manager_ozone.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Tests may inject a NativeDisplayDelegate, otherwise get it from 142 // Tests may inject a NativeDisplayDelegate, otherwise get it from
143 // OzonePlatform. 143 // OzonePlatform.
144 if (!native_display_delegate_) { 144 if (!native_display_delegate_) {
145 native_display_delegate_ = 145 native_display_delegate_ =
146 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); 146 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate();
147 } 147 }
148 148
149 // The FakeDisplayController gives us a way to make the NativeDisplayDelegate 149 // The FakeDisplayController gives us a way to make the NativeDisplayDelegate
150 // pretend something display related has happened. 150 // pretend something display related has happened.
151 if (!base::SysInfo::IsRunningOnChromeOS()) { 151 if (!base::SysInfo::IsRunningAsSystemCompositor()) {
152 fake_display_controller_ = 152 fake_display_controller_ =
153 native_display_delegate_->GetFakeDisplayController(); 153 native_display_delegate_->GetFakeDisplayController();
154 } 154 }
155 155
156 // Create a new Screen instance. 156 // Create a new Screen instance.
157 std::unique_ptr<ScreenBase> screen = base::MakeUnique<ScreenBase>(); 157 std::unique_ptr<ScreenBase> screen = base::MakeUnique<ScreenBase>();
158 Screen::SetScreenInstance(screen.get()); 158 Screen::SetScreenInstance(screen.get());
159 screen_ = screen.get(); 159 screen_ = screen.get();
160 160
161 // Configure display manager. ScreenManager acts as an observer to find out 161 // Configure display manager. ScreenManager acts as an observer to find out
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 controller_bindings_.AddBinding(this, std::move(request)); 369 controller_bindings_.AddBinding(this, std::move(request));
370 } 370 }
371 371
372 void ScreenManagerOzone::Create( 372 void ScreenManagerOzone::Create(
373 const service_manager::Identity& remote_identity, 373 const service_manager::Identity& remote_identity,
374 mojom::TestDisplayControllerRequest request) { 374 mojom::TestDisplayControllerRequest request) {
375 test_bindings_.AddBinding(this, std::move(request)); 375 test_bindings_.AddBinding(this, std::move(request));
376 } 376 }
377 377
378 } // namespace display 378 } // namespace display
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698