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

Side by Side Diff: ash/common/system/chromeos/palette/eject_controller.h

Issue 2234203002: Auto open and close the palette on an eject event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tool-note
Patch Set: Rebase on master Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_EJECT_CONTROLLER_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_EJECT_CONTROLLER_H_
7
8 #include "ash/ash_export.h"
9 #include "base/callback.h"
10 #include "base/macros.h"
11 #include "ui/events/devices/input_device_event_observer.h"
12 #include "ui/events/devices/input_device_manager.h"
13
14 namespace ash {
15
16 // This class observes input device changes for the palette.
17 class ASH_EXPORT EjectController : public ui::InputDeviceEventObserver {
18 public:
19 using OnEjectCallback = base::Callback<void(ui::StylusState)>;
20
21 EjectController(const OnEjectCallback& on_eject);
oshima 2016/08/24 23:38:50 nit: explicit
jdufault 2016/08/24 23:54:07 Done.
22 ~EjectController() override;
23
24 private:
25 // ui::InputDeviceObserver:
26 void OnStylusStateChanged(ui::StylusState state) override;
27
28 OnEjectCallback on_eject_;
29
30 DISALLOW_COPY_AND_ASSIGN(EjectController);
31 };
32
33 } // namespace ash
34
35 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_EJECT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698