summaryrefslogtreecommitdiffstats
path: root/ash/high_contrast/high_contrast_controller.cc
blob: 978f11ee3346586a466f79bf589146adf95ee821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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::GetPrimaryRootWindow();
}

void HighContrastController::SetEnabled(bool enabled) {
  enabled_ = enabled;

  root_window_->layer()->SetLayerInverted(enabled_);
}

}  // namespace ash