| OLD | NEW |
| 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 "chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view
.h" | 5 #include "chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view
.h" |
| 6 | 6 |
| 7 #include "ash/display/window_tree_host_manager.h" | 7 #include "ash/display/window_tree_host_manager.h" |
| 8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
| 9 #include "ash/resources/vector_icons/vector_icons.h" | 9 #include "ash/resources/vector_icons/vector_icons.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 gfx::Point(kThrobberCircleViewHorizontalOffset, 0)); | 534 gfx::Point(kThrobberCircleViewHorizontalOffset, 0)); |
| 535 | 535 |
| 536 // Initialize the tap label. | 536 // Initialize the tap label. |
| 537 tap_label_ = new views::Label( | 537 tap_label_ = new views::Label( |
| 538 rb.GetLocalizedString(IDS_DISPLAY_TOUCH_CALIBRATION_TAP_HERE_LABEL), | 538 rb.GetLocalizedString(IDS_DISPLAY_TOUCH_CALIBRATION_TAP_HERE_LABEL), |
| 539 {rb.GetFontListWithDelta(6, gfx::Font::FontStyle::NORMAL, | 539 {rb.GetFontListWithDelta(6, gfx::Font::FontStyle::NORMAL, |
| 540 gfx::Font::Weight::NORMAL)}); | 540 gfx::Font::Weight::NORMAL)}); |
| 541 tap_label_->SetBounds(0, kThrobberCircleViewWidth, kTapLabelWidth, | 541 tap_label_->SetBounds(0, kThrobberCircleViewWidth, kTapLabelWidth, |
| 542 kTapLabelHeight); | 542 kTapLabelHeight); |
| 543 tap_label_->SetEnabledColor(kTapHereLabelColor); | 543 tap_label_->SetEnabledColor(kTapHereLabelColor); |
| 544 tap_label_->SetDisabledColor(kTapHereLabelColor); | |
| 545 tap_label_->SetHorizontalAlignment(gfx::ALIGN_CENTER); | 544 tap_label_->SetHorizontalAlignment(gfx::ALIGN_CENTER); |
| 546 tap_label_->SetAutoColorReadabilityEnabled(false); | 545 tap_label_->SetAutoColorReadabilityEnabled(false); |
| 547 tap_label_->SetSubpixelRenderingEnabled(false); | 546 tap_label_->SetSubpixelRenderingEnabled(false); |
| 548 tap_label_->SetVisible(false); | 547 tap_label_->SetVisible(false); |
| 549 | 548 |
| 550 touch_point_view_ = new views::View; | 549 touch_point_view_ = new views::View; |
| 551 touch_point_view_->SetBounds(kTouchPointViewOffset, kTouchPointViewOffset, | 550 touch_point_view_->SetBounds(kTouchPointViewOffset, kTouchPointViewOffset, |
| 552 kTapLabelWidth, kTouchPointViewHeight); | 551 kTapLabelWidth, kTouchPointViewHeight); |
| 553 touch_point_view_->SetVisible(false); | 552 touch_point_view_->SetVisible(false); |
| 554 touch_point_view_->SetPaintToLayer(); | 553 touch_point_view_->SetPaintToLayer(); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 void TouchCalibratorView::SkipCurrentAnimation() { | 823 void TouchCalibratorView::SkipCurrentAnimation() { |
| 825 if (animator_->is_animating()) | 824 if (animator_->is_animating()) |
| 826 animator_->End(); | 825 animator_->End(); |
| 827 if (touch_point_view_ && | 826 if (touch_point_view_ && |
| 828 touch_point_view_->layer()->GetAnimator()->is_animating()) { | 827 touch_point_view_->layer()->GetAnimator()->is_animating()) { |
| 829 touch_point_view_->layer()->GetAnimator()->StopAnimating(); | 828 touch_point_view_->layer()->GetAnimator()->StopAnimating(); |
| 830 } | 829 } |
| 831 } | 830 } |
| 832 | 831 |
| 833 } // namespace chromeos | 832 } // namespace chromeos |
| OLD | NEW |