Chromium Code Reviews| Index: ash/display/display_color_manager_chromeos.h |
| diff --git a/ash/display/display_color_manager_chromeos.h b/ash/display/display_color_manager_chromeos.h |
| index b434e05a351ea745f1697e87a3a03d1cc0a3fb68..e8c9090c90b8652b14edb18cbc6f8cb0bff516cd 100644 |
| --- a/ash/display/display_color_manager_chromeos.h |
| +++ b/ash/display/display_color_manager_chromeos.h |
| @@ -15,14 +15,14 @@ |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| #include "ui/display/chromeos/display_configurator.h" |
| -#include "ui/gfx/display.h" |
| -#include "ui/gfx/display_observer.h" |
| +#include "ui/display/types/display_constants.h" |
| namespace base { |
| class SequencedWorkerPool; |
| } |
| namespace ui { |
| +class DisplaySnapshot; |
| struct GammaRampRGBEntry; |
| } // namespace ui |
| @@ -31,8 +31,7 @@ namespace ash { |
| // An object that observes changes in display configuration applies any color |
| // calibration where needed. |
| class ASH_EXPORT DisplayColorManager |
| - : public ui::DisplayConfigurator::Observer, |
| - public base::SupportsWeakPtr<DisplayColorManager> { |
| + : public ui::DisplayConfigurator::Observer { |
| public: |
| DisplayColorManager(ui::DisplayConfigurator* configurator, |
| base::SequencedWorkerPool* blocking_pool); |
| @@ -52,19 +51,27 @@ class ASH_EXPORT DisplayColorManager |
| std::vector<ui::GammaRampRGBEntry> lut; |
| }; |
| + protected: |
| + virtual void FinishLoadCalibrationForDisplay(int64_t display_id, |
| + int64_t product_id, |
| + ui::DisplayConnectionType type, |
| + const base::FilePath& path, |
| + bool file_downloaded); |
| + virtual void UpdateCalibrationData(int64_t display_id, |
| + int64_t product_id, |
| + scoped_ptr<ColorCalibrationData> data); |
|
oshima
2016/03/22 20:27:21
why virtual?
Greg Levin
2016/03/23 00:16:18
The DCM unit test needs to add some code to these
oshima
2016/03/23 09:06:48
It looks to me that you can simply wait until the
Greg Levin
2016/03/23 16:09:19
I may be misremembering, but I seem to recall Quit
oshima
2016/03/23 17:10:45
You're right. I misread the code. Please disregard
|
| + |
| private: |
| void ApplyDisplayColorCalibration(int64_t display_id, int64_t product_id); |
| void LoadCalibrationForDisplay(const ui::DisplaySnapshot* display); |
| - void UpdateCalibrationData( |
| - int64_t display_id, |
| - int64_t product_id, |
| - scoped_ptr<DisplayColorManager::ColorCalibrationData> data, |
| - bool success); |
| ui::DisplayConfigurator* configurator_; |
| std::map<int64_t, ColorCalibrationData*> calibration_map_; |
| base::SequencedWorkerPool* blocking_pool_; |
| + // Factory for callbacks. |
| + base::WeakPtrFactory<DisplayColorManager> weak_ptr_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(DisplayColorManager); |
| }; |