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

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

Issue 2840043003: chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: merge Created 3 years, 7 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 | « chrome/browser/ui/ash/ash_init.cc ('k') | services/ui/ws/window_server.cc » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_forwarding.h" 5 #include "services/ui/display/screen_manager_forwarding.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "services/service_manager/public/cpp/binder_registry.h" 10 #include "services/service_manager/public/cpp/binder_registry.h"
(...skipping 19 matching lines...) Expand all
30 return mode.get(); 30 return mode.get();
31 } 31 }
32 } 32 }
33 NOTREACHED(); 33 NOTREACHED();
34 return nullptr; 34 return nullptr;
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
39 ScreenManagerForwarding::ScreenManagerForwarding() 39 ScreenManagerForwarding::ScreenManagerForwarding()
40 : screen_(base::MakeUnique<display::ScreenBase>()), binding_(this) {} 40 : screen_(base::MakeUnique<display::ScreenBase>()), binding_(this) {
41 Screen::SetScreenInstance(screen_.get());
42 }
41 43
42 ScreenManagerForwarding::~ScreenManagerForwarding() { 44 ScreenManagerForwarding::~ScreenManagerForwarding() {
43 if (native_display_delegate_) 45 if (native_display_delegate_)
44 native_display_delegate_->RemoveObserver(this); 46 native_display_delegate_->RemoveObserver(this);
47 Screen::SetScreenInstance(nullptr);
45 } 48 }
46 49
47 void ScreenManagerForwarding::AddInterfaces( 50 void ScreenManagerForwarding::AddInterfaces(
48 service_manager::BinderRegistry* registry) { 51 service_manager::BinderRegistry* registry) {
49 registry->AddInterface<mojom::NativeDisplayDelegate>(this); 52 registry->AddInterface<mojom::NativeDisplayDelegate>(this);
50 } 53 }
51 54
52 void ScreenManagerForwarding::Init(ScreenManagerDelegate* delegate) { 55 void ScreenManagerForwarding::Init(ScreenManagerDelegate* delegate) {
53 // Done in NativeDisplayDelegate::Initialize() instead. 56 // Done in NativeDisplayDelegate::Initialize() instead.
54 } 57 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 if (status) { 208 if (status) {
206 // Modify display snapshot similar to how ConfigureDisplaysTask would. Ozone 209 // Modify display snapshot similar to how ConfigureDisplaysTask would. Ozone
207 // DRM needs these to be changed and ConfigureDisplaysTasks can't do it. 210 // DRM needs these to be changed and ConfigureDisplaysTasks can't do it.
208 snapshot->set_current_mode(mode); 211 snapshot->set_current_mode(mode);
209 snapshot->set_origin(origin); 212 snapshot->set_origin(origin);
210 } 213 }
211 callback.Run(status); 214 callback.Run(status);
212 } 215 }
213 216
214 } // namespace display 217 } // namespace display
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | services/ui/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698