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

Side by Side Diff: cc/input/selection.h

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing aura problems Created 4 years, 4 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 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 CC_INPUT_SELECTION_H_ 5 #ifndef CC_INPUT_SELECTION_H_
6 #define CC_INPUT_SELECTION_H_ 6 #define CC_INPUT_SELECTION_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 template <typename BoundType> 12 template <typename BoundType>
13 struct CC_EXPORT Selection { 13 struct CC_EXPORT Selection {
14 Selection() : is_editable(false), is_empty_text_form_control(false) {} 14 Selection()
15 : is_editable(false),
16 is_empty_text_form_control(false),
17 is_handle_visible(true) {}
15 ~Selection() {} 18 ~Selection() {}
16 19
17 BoundType start, end; 20 BoundType start, end;
18 bool is_editable; 21 bool is_editable;
19 bool is_empty_text_form_control; 22 bool is_empty_text_form_control;
23 bool is_handle_visible;
20 }; 24 };
21 25
22 template <typename BoundType> 26 template <typename BoundType>
23 inline bool operator==(const Selection<BoundType>& lhs, 27 inline bool operator==(const Selection<BoundType>& lhs,
24 const Selection<BoundType>& rhs) { 28 const Selection<BoundType>& rhs) {
25 return lhs.start == rhs.start && lhs.end == rhs.end && 29 return lhs.start == rhs.start && lhs.end == rhs.end &&
26 lhs.is_editable == rhs.is_editable && 30 lhs.is_editable == rhs.is_editable &&
27 lhs.is_empty_text_form_control == rhs.is_empty_text_form_control; 31 lhs.is_empty_text_form_control == rhs.is_empty_text_form_control &&
32 lhs.is_handle_visible == rhs.is_handle_visible;
28 } 33 }
29 34
30 template <typename BoundType> 35 template <typename BoundType>
31 inline bool operator!=(const Selection<BoundType>& lhs, 36 inline bool operator!=(const Selection<BoundType>& lhs,
32 const Selection<BoundType>& rhs) { 37 const Selection<BoundType>& rhs) {
33 return !(lhs == rhs); 38 return !(lhs == rhs);
34 } 39 }
35 40
36 } // namespace cc 41 } // namespace cc
37 42
38 #endif // CC_INPUT_SELECTION_H_ 43 #endif // CC_INPUT_SELECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698