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
3 // found in the LICENSE file.
5 #include "ui/platform_window/text_input_state.h"
9 TextInputState::TextInputState()
10 : type(TEXT_INPUT_TYPE_NONE
),
11 flags(TEXT_INPUT_FLAG_NONE
),
16 can_compose_inline(false) {}
18 TextInputState::TextInputState(TextInputType type
,
20 const std::string
& text
,
23 int composition_start
,
25 bool can_compose_inline
)
29 selection_start(selection_start
),
30 selection_end(selection_end
),
31 composition_start(composition_start
),
32 composition_end(composition_end
),
33 can_compose_inline(can_compose_inline
) {}
35 bool TextInputState::operator==(const TextInputState
& other
) const {
36 return type
== other
.type
&&
37 flags
== other
.flags
&&
39 selection_start
== other
.selection_start
&&
40 selection_end
== other
.selection_end
&&
41 composition_start
== other
.composition_start
&&
42 composition_end
== other
.composition_end
&&
43 can_compose_inline
== other
.can_compose_inline
;