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

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

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 "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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const gfx::Display& target_display, const gfx::Insets& initial_insets) 63 const gfx::Display& target_display, const gfx::Insets& initial_insets)
64 : display_(target_display), 64 : display_(target_display),
65 insets_(initial_insets), 65 insets_(initial_insets),
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::DisplayInfo info =
74 display_manager()->GetDisplayInfo(display_.id()); 74 ash::Shell::GetInstance()->display_manager()->GetDisplayInfo(
75 display_.id());
75 76
76 aura::Window* root = ash::Shell::GetInstance()->display_controller()-> 77 aura::Window* root = ash::Shell::GetInstance()->display_controller()->
77 GetRootWindowForDisplayId(display_.id()); 78 GetRootWindowForDisplayId(display_.id());
78 ui::Layer* parent_layer = ash::Shell::GetContainer( 79 ui::Layer* parent_layer =
79 root, ash::internal::kShellWindowId_OverlayContainer)->layer(); 80 ash::Shell::GetContainer(root, ash::kShellWindowId_OverlayContainer)
81 ->layer();
80 82
81 calibration_layer_.reset(new ui::Layer()); 83 calibration_layer_.reset(new ui::Layer());
82 calibration_layer_->SetOpacity(0.5f); 84 calibration_layer_->SetOpacity(0.5f);
83 calibration_layer_->SetBounds(parent_layer->bounds()); 85 calibration_layer_->SetBounds(parent_layer->bounds());
84 calibration_layer_->set_delegate(this); 86 calibration_layer_->set_delegate(this);
85 parent_layer->Add(calibration_layer_.get()); 87 parent_layer->Add(calibration_layer_.get());
86 } 88 }
87 89
88 OverscanCalibrator::~OverscanCalibrator() { 90 OverscanCalibrator::~OverscanCalibrator() {
89 // Overscan calibration has finished without commit, so the display has to 91 // Overscan calibration has finished without commit, so the display has to
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 float device_scale_factor) { 137 float device_scale_factor) {
136 // TODO(mukai): Cancel the overscan calibration when the device 138 // TODO(mukai): Cancel the overscan calibration when the device
137 // configuration has changed. 139 // configuration has changed.
138 } 140 }
139 141
140 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() { 142 base::Closure OverscanCalibrator::PrepareForLayerBoundsChange() {
141 return base::Closure(); 143 return base::Closure();
142 } 144 }
143 145
144 } // namespace chromeos 146 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698