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

Side by Side Diff: ash/accelerators/key_hold_detector.h

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « ash/accelerators/exit_warning_handler.cc ('k') | ash/accelerators/key_hold_detector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_ 5 #ifndef ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_
6 #define ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_ 6 #define ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 private: 52 private:
53 // A state to keep track of one click and click and hold operation. 53 // A state to keep track of one click and click and hold operation.
54 // 54 //
55 // One click: 55 // One click:
56 // INITIAL --(first press)--> PRESSED --(release)--> INITIAL[SEND PRESS] 56 // INITIAL --(first press)--> PRESSED --(release)--> INITIAL[SEND PRESS]
57 // 57 //
58 // Click and hold: 58 // Click and hold:
59 // INITIAL --(first press)--> PRESSED --(press)--> 59 // INITIAL --(first press)--> PRESSED --(press)-->
60 // HOLD[OnKeyHold] --(press)--> HOLD[OnKeyHold] --(release)--> 60 // HOLD[OnKeyHold] --(press)--> HOLD[OnKeyHold] --(release)-->
61 // INITIAL[OnKeyUnhold] 61 // INITIAL[OnKeyUnhold]
62 enum State { 62 enum State { INITIAL, PRESSED, HOLD };
63 INITIAL,
64 PRESSED,
65 HOLD
66 };
67 63
68 State state_; 64 State state_;
69 std::unique_ptr<Delegate> delegate_; 65 std::unique_ptr<Delegate> delegate_;
70 66
71 DISALLOW_COPY_AND_ASSIGN(KeyHoldDetector); 67 DISALLOW_COPY_AND_ASSIGN(KeyHoldDetector);
72 }; 68 };
73 69
74 } // namespace ash 70 } // namespace ash
75 71
76 #endif // ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_ 72 #endif // ASH_ACCELERATOR_KEY_HOLD_DETECTOR_H_
OLDNEW
« no previous file with comments | « ash/accelerators/exit_warning_handler.cc ('k') | ash/accelerators/key_hold_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698