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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/SelectionState.h

Issue 2916493002: Make SelectionState enum class (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SelectionState_h 5 #ifndef SelectionState_h
6 #define SelectionState_h 6 #define SelectionState_h
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 #define FOR_EACH_SELECTION_STATE(V) \ 13 enum class SelectionState {
14 /* The object is not selected. */ \ 14 /* The object is not selected. */
15 V(None) \ 15 kNone,
16 /* The object either contains the start of a selection run or is the */ \ 16 /* The object either contains the start of a selection run or is the */
17 /* start of a run. */ \ 17 /* start of a run. */
18 V(Start) \ 18 kStart,
19 /* The object is fully encompassed by a selection run. */ \ 19 /* The object is fully encompassed by a selection run. */
20 V(Inside) \ 20 kInside,
21 /* The object either contains the end of a selection run or is the */ \ 21 /* The object either contains the end of a selection run or is the */
22 /* end of a run. */ \ 22 /* end of a run. */
23 V(End) \ 23 kEnd,
24 /* The object contains an entire run or is the sole selected object */ \ 24 /* The object contains an entire run or is the sole selected object */
25 /* in that run. */ \ 25 /* in that run. */
26 V(Both) 26 kStartAndEnd
27
28 enum SelectionState {
29 #define V(state) Selection##state,
30 FOR_EACH_SELECTION_STATE(V)
31 #undef V
32 }; 27 };
33 28
34 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionState); 29 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionState);
35 30
36 } // namespace blink 31 } // namespace blink
37 32
38 #endif // SelectionState_h 33 #endif // SelectionState_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/layout/api/SelectionState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698