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

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

Issue 2691583003: Removed fields from Selection classes (Closed)
Patch Set: Forgot to remove fields from test Created 3 years, 10 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 | « no previous file | cc/ipc/cc_param_traits_macros.h » ('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 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 ~Selection() {} 15 ~Selection() {}
16 16
17 BoundType start, end; 17 BoundType start, end;
18 bool is_editable;
19 bool is_empty_text_form_control;
20 }; 18 };
21 19
22 template <typename BoundType> 20 template <typename BoundType>
23 inline bool operator==(const Selection<BoundType>& lhs, 21 inline bool operator==(const Selection<BoundType>& lhs,
24 const Selection<BoundType>& rhs) { 22 const Selection<BoundType>& rhs) {
25 return lhs.start == rhs.start && lhs.end == rhs.end && 23 return lhs.start == rhs.start && lhs.end == rhs.end;
26 lhs.is_editable == rhs.is_editable &&
27 lhs.is_empty_text_form_control == rhs.is_empty_text_form_control;
28 } 24 }
29 25
30 template <typename BoundType> 26 template <typename BoundType>
31 inline bool operator!=(const Selection<BoundType>& lhs, 27 inline bool operator!=(const Selection<BoundType>& lhs,
32 const Selection<BoundType>& rhs) { 28 const Selection<BoundType>& rhs) {
33 return !(lhs == rhs); 29 return !(lhs == rhs);
34 } 30 }
35 31
36 } // namespace cc 32 } // namespace cc
37 33
38 #endif // CC_INPUT_SELECTION_H_ 34 #endif // CC_INPUT_SELECTION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698