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

Unified Diff: ash/display/display_color_manager_chromeos.h

Issue 1528963002: Quirks Client for downloading and providing display profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A few small tweaks Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_color_manager_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..58e2d9c3d2bccc4dbd41f703da3d212426797dc8 100644
--- a/ash/display/display_color_manager_chromeos.h
+++ b/ash/display/display_color_manager_chromeos.h
@@ -14,15 +14,16 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.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 +32,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 +52,28 @@ 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);
+
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::ThreadChecker thread_checker_;
base::SequencedWorkerPool* blocking_pool_;
+ // Factory for callbacks.
+ base::WeakPtrFactory<DisplayColorManager> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(DisplayColorManager);
};
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_color_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698