OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ |
6 #define ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ | 6 #define ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "ash/ash_export.h" | 14 #include "ash/ash_export.h" |
14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
17 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
18 #include "ui/display/chromeos/display_configurator.h" | 19 #include "ui/display/chromeos/display_configurator.h" |
19 #include "ui/display/types/display_constants.h" | 20 #include "ui/display/types/display_constants.h" |
20 | 21 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 std::vector<float> correction_matrix; | 55 std::vector<float> correction_matrix; |
55 }; | 56 }; |
56 | 57 |
57 protected: | 58 protected: |
58 virtual void FinishLoadCalibrationForDisplay(int64_t display_id, | 59 virtual void FinishLoadCalibrationForDisplay(int64_t display_id, |
59 int64_t product_id, | 60 int64_t product_id, |
60 bool has_color_correction_matrix, | 61 bool has_color_correction_matrix, |
61 ui::DisplayConnectionType type, | 62 ui::DisplayConnectionType type, |
62 const base::FilePath& path, | 63 const base::FilePath& path, |
63 bool file_downloaded); | 64 bool file_downloaded); |
64 virtual void UpdateCalibrationData(int64_t display_id, | 65 virtual void UpdateCalibrationData( |
65 int64_t product_id, | 66 int64_t display_id, |
66 scoped_ptr<ColorCalibrationData> data); | 67 int64_t product_id, |
| 68 std::unique_ptr<ColorCalibrationData> data); |
67 | 69 |
68 private: | 70 private: |
69 void ApplyDisplayColorCalibration(int64_t display_id, int64_t product_id); | 71 void ApplyDisplayColorCalibration(int64_t display_id, int64_t product_id); |
70 void LoadCalibrationForDisplay(const ui::DisplaySnapshot* display); | 72 void LoadCalibrationForDisplay(const ui::DisplaySnapshot* display); |
71 | 73 |
72 ui::DisplayConfigurator* configurator_; | 74 ui::DisplayConfigurator* configurator_; |
73 std::map<int64_t, ColorCalibrationData*> calibration_map_; | 75 std::map<int64_t, ColorCalibrationData*> calibration_map_; |
74 base::ThreadChecker thread_checker_; | 76 base::ThreadChecker thread_checker_; |
75 base::SequencedWorkerPool* blocking_pool_; | 77 base::SequencedWorkerPool* blocking_pool_; |
76 | 78 |
77 // Factory for callbacks. | 79 // Factory for callbacks. |
78 base::WeakPtrFactory<DisplayColorManager> weak_ptr_factory_; | 80 base::WeakPtrFactory<DisplayColorManager> weak_ptr_factory_; |
79 | 81 |
80 DISALLOW_COPY_AND_ASSIGN(DisplayColorManager); | 82 DISALLOW_COPY_AND_ASSIGN(DisplayColorManager); |
81 }; | 83 }; |
82 | 84 |
83 } // namespace ash | 85 } // namespace ash |
84 | 86 |
85 #endif // ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ | 87 #endif // ASH_DISPLAY_DISPLAY_COLOR_MANAGER_CHROMEOS_H_ |
OLD | NEW |