| 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 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_OVERSCAN_CALIBRATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_OVERSCAN_CALIBRATOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_OVERSCAN_CALIBRATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_OVERSCAN_CALIBRATOR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/compositor/layer_delegate.h" | 10 #include "ui/compositor/layer_delegate.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // value. Otherwise, the default value is the old |initial_insets_|. | 34 // value. Otherwise, the default value is the old |initial_insets_|. |
| 35 void Reset(); | 35 void Reset(); |
| 36 | 36 |
| 37 // Updates the insets and redraw the visual feedback. | 37 // Updates the insets and redraw the visual feedback. |
| 38 void UpdateInsets(const gfx::Insets& insets); | 38 void UpdateInsets(const gfx::Insets& insets); |
| 39 | 39 |
| 40 const gfx::Insets& insets() const { return insets_; } | 40 const gfx::Insets& insets() const { return insets_; } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // ui::LayerDelegate overrides: | 43 // ui::LayerDelegate overrides: |
| 44 void OnPaintLayer(gfx::Canvas* canvas) override; | 44 void OnPaintLayer(const ui::PaintContext& context) override; |
| 45 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; | 45 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; |
| 46 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | 46 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
| 47 base::Closure PrepareForLayerBoundsChange() override; | 47 base::Closure PrepareForLayerBoundsChange() override; |
| 48 | 48 |
| 49 // The target display. | 49 // The target display. |
| 50 const gfx::Display display_; | 50 const gfx::Display display_; |
| 51 | 51 |
| 52 // The current insets. | 52 // The current insets. |
| 53 gfx::Insets insets_; | 53 gfx::Insets insets_; |
| 54 | 54 |
| 55 // The insets initially given. Stored so we can undo the insets later. | 55 // The insets initially given. Stored so we can undo the insets later. |
| 56 gfx::Insets initial_insets_; | 56 gfx::Insets initial_insets_; |
| 57 | 57 |
| 58 // Whether the current insets are committed to the system or not. | 58 // Whether the current insets are committed to the system or not. |
| 59 bool committed_; | 59 bool committed_; |
| 60 | 60 |
| 61 // The visualization layer for the current calibration region. | 61 // The visualization layer for the current calibration region. |
| 62 scoped_ptr<ui::Layer> calibration_layer_; | 62 scoped_ptr<ui::Layer> calibration_layer_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(OverscanCalibrator); | 64 DISALLOW_COPY_AND_ASSIGN(OverscanCalibrator); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace chromeos | 67 } // namespace chromeos |
| 68 | 68 |
| 69 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_OVERSCAN_CALIBRATOR_H_ | 69 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_OVERSCAN_CALIBRATOR_H_ |
| OLD | NEW |