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

Side by Side Diff: chrome/browser/chromeos/display/overscan_calibrator.cc

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/display/overscan_calibrator.h" 5 #include "chrome/browser/chromeos/display/overscan_calibrator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
11 #include "ash/common/display/display_info.h"
12 #include "ash/common/shell_window_ids.h" 11 #include "ash/common/shell_window_ids.h"
13 #include "ash/display/display_manager.h" 12 #include "ash/display/display_manager.h"
14 #include "ash/display/window_tree_host_manager.h" 13 #include "ash/display/window_tree_host_manager.h"
15 #include "ash/shell.h" 14 #include "ash/shell.h"
16 #include "base/callback.h" 15 #include "base/callback.h"
17 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
18 #include "third_party/skia/include/core/SkPaint.h" 17 #include "third_party/skia/include/core/SkPaint.h"
19 #include "third_party/skia/include/core/SkPath.h" 18 #include "third_party/skia/include/core/SkPath.h"
20 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
21 #include "ui/compositor/layer.h" 20 #include "ui/compositor/layer.h"
22 #include "ui/compositor/paint_recorder.h" 21 #include "ui/compositor/paint_recorder.h"
22 #include "ui/display/manager/managed_display_info.h"
23 #include "ui/gfx/canvas.h" 23 #include "ui/gfx/canvas.h"
24 24
25 namespace chromeos { 25 namespace chromeos {
26 namespace { 26 namespace {
27 27
28 // The opacity for the arrows of the overscan calibration. 28 // The opacity for the arrows of the overscan calibration.
29 const float kArrowOpacity = 0.8; 29 const float kArrowOpacity = 0.8;
30 30
31 // The height in pixel for the arrows to show the overscan calibration. 31 // The height in pixel for the arrows to show the overscan calibration.
32 const int kCalibrationArrowHeight = 70; 32 const int kCalibrationArrowHeight = 70;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const gfx::Insets& initial_insets) 75 const gfx::Insets& initial_insets)
76 : display_(target_display), 76 : display_(target_display),
77 insets_(initial_insets), 77 insets_(initial_insets),
78 initial_insets_(initial_insets), 78 initial_insets_(initial_insets),
79 committed_(false) { 79 committed_(false) {
80 // Undo the overscan calibration temporarily so that the user can see 80 // Undo the overscan calibration temporarily so that the user can see
81 // dark boundary and current overscan region. 81 // dark boundary and current overscan region.
82 ash::Shell::GetInstance()->window_tree_host_manager()->SetOverscanInsets( 82 ash::Shell::GetInstance()->window_tree_host_manager()->SetOverscanInsets(
83 display_.id(), gfx::Insets()); 83 display_.id(), gfx::Insets());
84 84
85 ash::DisplayInfo info = 85 display::ManagedDisplayInfo info =
86 ash::Shell::GetInstance()->display_manager()->GetDisplayInfo( 86 ash::Shell::GetInstance()->display_manager()->GetDisplayInfo(
87 display_.id()); 87 display_.id());
88 88
89 aura::Window* root = ash::Shell::GetInstance() 89 aura::Window* root = ash::Shell::GetInstance()
90 ->window_tree_host_manager() 90 ->window_tree_host_manager()
91 ->GetRootWindowForDisplayId(display_.id()); 91 ->GetRootWindowForDisplayId(display_.id());
92 ui::Layer* parent_layer = 92 ui::Layer* parent_layer =
93 ash::Shell::GetContainer(root, ash::kShellWindowId_OverlayContainer) 93 ash::Shell::GetContainer(root, ash::kShellWindowId_OverlayContainer)
94 ->layer(); 94 ->layer();
95 95
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 float device_scale_factor) { 157 float device_scale_factor) {
158 // TODO(mukai): Cancel the overscan calibration when the device 158 // TODO(mukai): Cancel the overscan calibration when the device
159 // configuration has changed. 159 // configuration has changed.
160 } 160 }
161 161
162 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() { 162 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() {
163 return base::Closure(); 163 return base::Closure();
164 } 164 }
165 165
166 } // namespace chromeos 166 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698