OLD | NEW |
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 "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/display/display_info.h" | 8 #include "ash/display/display_info.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 initial_insets_(initial_insets), | 66 initial_insets_(initial_insets), |
67 committed_(false) { | 67 committed_(false) { |
68 // Undo the overscan calibration temporarily so that the user can see | 68 // Undo the overscan calibration temporarily so that the user can see |
69 // dark boundary and current overscan region. | 69 // dark boundary and current overscan region. |
70 ash::Shell::GetInstance()->display_controller()->SetOverscanInsets( | 70 ash::Shell::GetInstance()->display_controller()->SetOverscanInsets( |
71 display_.id(), gfx::Insets()); | 71 display_.id(), gfx::Insets()); |
72 | 72 |
73 ash::internal::DisplayInfo info = ash::Shell::GetInstance()-> | 73 ash::internal::DisplayInfo info = ash::Shell::GetInstance()-> |
74 display_manager()->GetDisplayInfo(display_.id()); | 74 display_manager()->GetDisplayInfo(display_.id()); |
75 | 75 |
76 aura::RootWindow* root = ash::Shell::GetInstance()->display_controller()-> | 76 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> |
77 GetRootWindowForDisplayId(display_.id()); | 77 GetRootWindowForDisplayId(display_.id()); |
78 ui::Layer* parent_layer = ash::Shell::GetContainer( | 78 ui::Layer* parent_layer = ash::Shell::GetContainer( |
79 root, ash::internal::kShellWindowId_OverlayContainer)->layer(); | 79 root, ash::internal::kShellWindowId_OverlayContainer)->layer(); |
80 | 80 |
81 calibration_layer_.reset(new ui::Layer()); | 81 calibration_layer_.reset(new ui::Layer()); |
82 calibration_layer_->SetOpacity(0.5f); | 82 calibration_layer_->SetOpacity(0.5f); |
83 calibration_layer_->SetBounds(parent_layer->bounds()); | 83 calibration_layer_->SetBounds(parent_layer->bounds()); |
84 calibration_layer_->set_delegate(this); | 84 calibration_layer_->set_delegate(this); |
85 parent_layer->Add(calibration_layer_.get()); | 85 parent_layer->Add(calibration_layer_.get()); |
86 } | 86 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 float device_scale_factor) { | 135 float device_scale_factor) { |
136 // TODO(mukai): Cancel the overscan calibration when the device | 136 // TODO(mukai): Cancel the overscan calibration when the device |
137 // configuration has changed. | 137 // configuration has changed. |
138 } | 138 } |
139 | 139 |
140 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() { | 140 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() { |
141 return base::Closure(); | 141 return base::Closure(); |
142 } | 142 } |
143 | 143 |
144 } // namespace chromeos | 144 } // namespace chromeos |
OLD | NEW |