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

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

Issue 2858563002: Revert of chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: 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 }
43 41
44 ScreenManagerForwarding::~ScreenManagerForwarding() { 42 ScreenManagerForwarding::~ScreenManagerForwarding() {
45 if (native_display_delegate_) 43 if (native_display_delegate_)
46 native_display_delegate_->RemoveObserver(this); 44 native_display_delegate_->RemoveObserver(this);
47 Screen::SetScreenInstance(nullptr);
48 } 45 }
49 46
50 void ScreenManagerForwarding::AddInterfaces( 47 void ScreenManagerForwarding::AddInterfaces(
51 service_manager::BinderRegistry* registry) { 48 service_manager::BinderRegistry* registry) {
52 registry->AddInterface<mojom::NativeDisplayDelegate>(this); 49 registry->AddInterface<mojom::NativeDisplayDelegate>(this);
53 } 50 }
54 51
55 void ScreenManagerForwarding::Init(ScreenManagerDelegate* delegate) { 52 void ScreenManagerForwarding::Init(ScreenManagerDelegate* delegate) {
56 // Done in NativeDisplayDelegate::Initialize() instead. 53 // Done in NativeDisplayDelegate::Initialize() instead.
57 } 54 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (status) { 205 if (status) {
209 // Modify display snapshot similar to how ConfigureDisplaysTask would. Ozone 206 // Modify display snapshot similar to how ConfigureDisplaysTask would. Ozone
210 // DRM needs these to be changed and ConfigureDisplaysTasks can't do it. 207 // DRM needs these to be changed and ConfigureDisplaysTasks can't do it.
211 snapshot->set_current_mode(mode); 208 snapshot->set_current_mode(mode);
212 snapshot->set_origin(origin); 209 snapshot->set_origin(origin);
213 } 210 }
214 callback.Run(status); 211 callback.Run(status);
215 } 212 }
216 213
217 } // namespace display 214 } // 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