Index: ash/high_contrast/high_contrast_controller.cc |
diff --git a/ash/high_contrast/high_contrast_controller.cc b/ash/high_contrast/high_contrast_controller.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b501fc9c6e1a80949c2c83d0151d9d9b918fc204 |
--- /dev/null |
+++ b/ash/high_contrast/high_contrast_controller.cc |
@@ -0,0 +1,24 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ash/high_contrast/high_contrast_controller.h" |
+ |
+#include "ash/shell.h" |
+#include "ui/aura/root_window.h" |
+#include "ui/compositor/layer.h" |
+ |
+namespace ash { |
+ |
+HighContrastController::HighContrastController() |
+ : enabled_(false) { |
+ root_window_ = ash::Shell::GetRootWindow(); |
+} |
+ |
+void HighContrastController::SetEnabled(bool enabled) { |
+ enabled_ = enabled; |
+ |
+ root_window_->layer()->SetInverted(enabled_); |
+} |
+ |
+} // namespace ash |