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

Unified Diff: ash/high_contrast/high_contrast_controller.cc

Issue 10201014: Implement High Contrast mode for Chrome OS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Working implementation Created 8 years, 7 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
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..cf00d92d734c5e1a8b2318609047bc890985b9d9
--- /dev/null
+++ b/ash/high_contrast/high_contrast_controller.cc
@@ -0,0 +1,26 @@
+// 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 {
+namespace internal {
+
+HighContrastController::HighContrastController()
+ : enable_(false) {
+ root_window_ = ash::Shell::GetRootWindow();
+}
+
+void HighContrastController::SetEnable(bool enable) {
+ enable_ = enable;
+
+ root_window_->layer()->SetInvert(enable_);
+}
+
+} // namespace internal
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698