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
3 // found in the LICENSE file.
5 #ifndef CC_INPUT_SELECTION_H_
6 #define CC_INPUT_SELECTION_H_
8 #include "cc/base/cc_export.h"
12 template <typename BoundType
>
13 struct CC_EXPORT Selection
{
14 Selection() : is_editable(false), is_empty_text_form_control(false) {}
19 bool is_empty_text_form_control
;
22 template <typename BoundType
>
23 inline bool operator==(const Selection
<BoundType
>& lhs
,
24 const Selection
<BoundType
>& rhs
) {
25 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
;
30 template <typename BoundType
>
31 inline bool operator!=(const Selection
<BoundType
>& lhs
,
32 const Selection
<BoundType
>& rhs
) {
38 #endif // CC_INPUT_SELECTION_H_