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

Side by Side Diff: ash/display/display_configuration_controller.cc

Issue 2445583002: Relocate display_manager from ash to ui (Closed)
Patch Set: fix windows build Created 4 years, 1 month 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 | « ash/display/display_configuration_controller.h ('k') | ash/display/display_manager.h » ('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 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 "ash/display/display_configuration_controller.h" 5 #include "ash/display/display_configuration_controller.h"
6 6
7 #include "ash/display/display_animator.h" 7 #include "ash/display/display_animator.h"
8 #include "ash/display/display_manager.h"
9 #include "ash/display/display_util.h" 8 #include "ash/display/display_util.h"
10 #include "ash/rotator/screen_rotation_animator.h" 9 #include "ash/rotator/screen_rotation_animator.h"
11 #include "base/time/time.h" 10 #include "base/time/time.h"
12 #include "ui/display/manager/display_layout.h" 11 #include "ui/display/manager/display_layout.h"
12 #include "ui/display/manager/display_manager.h"
13 13
14 #if defined(OS_CHROMEOS) 14 #if defined(OS_CHROMEOS)
15 #include "ash/display/display_animator_chromeos.h" 15 #include "ash/display/display_animator_chromeos.h"
16 #include "base/sys_info.h" 16 #include "base/sys_info.h"
17 #include "grit/ash_strings.h" 17 #include "grit/ash_strings.h"
18 #endif 18 #endif
19 19
20 namespace { 20 namespace {
21 21
22 // Specifies how long the display change should have been disabled 22 // Specifies how long the display change should have been disabled
(...skipping 21 matching lines...) Expand all
44 44
45 bool IsThrottled() const { return base::Time::Now() < throttle_timeout_; } 45 bool IsThrottled() const { return base::Time::Now() < throttle_timeout_; }
46 46
47 private: 47 private:
48 base::Time throttle_timeout_; 48 base::Time throttle_timeout_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(DisplayChangeLimiter); 50 DISALLOW_COPY_AND_ASSIGN(DisplayChangeLimiter);
51 }; 51 };
52 52
53 DisplayConfigurationController::DisplayConfigurationController( 53 DisplayConfigurationController::DisplayConfigurationController(
54 DisplayManager* display_manager, 54 display::DisplayManager* display_manager,
55 WindowTreeHostManager* window_tree_host_manager) 55 WindowTreeHostManager* window_tree_host_manager)
56 : display_manager_(display_manager), 56 : display_manager_(display_manager),
57 window_tree_host_manager_(window_tree_host_manager), 57 window_tree_host_manager_(window_tree_host_manager),
58 weak_ptr_factory_(this) { 58 weak_ptr_factory_(this) {
59 window_tree_host_manager_->AddObserver(this); 59 window_tree_host_manager_->AddObserver(this);
60 #if defined(OS_CHROMEOS) 60 #if defined(OS_CHROMEOS)
61 if (base::SysInfo::IsRunningOnChromeOS()) 61 if (base::SysInfo::IsRunningOnChromeOS())
62 limiter_.reset(new DisplayChangeLimiter); 62 limiter_.reset(new DisplayChangeLimiter);
63 display_animator_.reset(new DisplayAnimatorChromeOS()); 63 display_animator_.reset(new DisplayAnimatorChromeOS());
64 #endif 64 #endif
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 170
171 void DisplayConfigurationController::SetPrimaryDisplayIdImpl( 171 void DisplayConfigurationController::SetPrimaryDisplayIdImpl(
172 int64_t display_id) { 172 int64_t display_id) {
173 window_tree_host_manager_->SetPrimaryDisplayId(display_id); 173 window_tree_host_manager_->SetPrimaryDisplayId(display_id);
174 if (display_animator_) 174 if (display_animator_)
175 display_animator_->StartFadeInAnimation(); 175 display_animator_->StartFadeInAnimation();
176 } 176 }
177 177
178 } // namespace ash 178 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_configuration_controller.h ('k') | ash/display/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698