Update V8 to version 4.7.21.
[chromium-blink-merge.git] / ash / system / brightness_control_delegate.h
blob153cc928691a5fb1585f805dfc6226736979993f
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_
6 #define ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_
8 #include "base/callback.h"
10 namespace ui {
11 class Accelerator;
12 } // namespace ui
14 namespace ash {
16 // Delegate for controlling the brightness.
17 class BrightnessControlDelegate {
18 public:
19 virtual ~BrightnessControlDelegate() {}
21 // Handles an accelerator-driven request to decrease or increase the screen
22 // brightness.
23 virtual void HandleBrightnessDown(const ui::Accelerator& accelerator) = 0;
24 virtual void HandleBrightnessUp(const ui::Accelerator& accelerator) = 0;
26 // Requests that the brightness be set to |percent|, in the range
27 // [0.0, 100.0]. |gradual| specifies whether the transition to the new
28 // brightness should be animated or instantaneous.
29 virtual void SetBrightnessPercent(double percent, bool gradual) = 0;
31 // Asynchronously invokes |callback| with the current brightness, in the range
32 // [0.0, 100.0].
33 virtual void GetBrightnessPercent(
34 const base::Callback<void(double)>& callback) = 0;
37 } // namespace ash
39 #endif // ASH_SYSTEM_BRIGHTNESS_CONTROL_DELEGATE_H_