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

Side by Side Diff: ui/base/ime/composition_text.h

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « tools/gn/bundle_file_rule.cc ('k') | ui/base/ime/composition_text.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_BASE_IME_COMPOSITION_TEXT_H_ 5 #ifndef UI_BASE_IME_COMPOSITION_TEXT_H_
6 #define UI_BASE_IME_COMPOSITION_TEXT_H_ 6 #define UI_BASE_IME_COMPOSITION_TEXT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/base/ime/composition_underline.h" 11 #include "ui/base/ime/composition_underline.h"
12 #include "ui/base/ime/ui_base_ime_export.h" 12 #include "ui/base/ime/ui_base_ime_export.h"
13 #include "ui/gfx/range/range.h" 13 #include "ui/gfx/range/range.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 // A struct represents the status of an ongoing composition text. 17 // A struct represents the status of an ongoing composition text.
18 struct UI_BASE_IME_EXPORT CompositionText { 18 struct UI_BASE_IME_EXPORT CompositionText {
19 CompositionText(); 19 CompositionText();
20 CompositionText(const CompositionText& other);
20 ~CompositionText(); 21 ~CompositionText();
21 22
22 bool operator==(const CompositionText& rhs) const { 23 bool operator==(const CompositionText& rhs) const {
23 if ((this->text != rhs.text) || 24 if ((this->text != rhs.text) ||
24 (this->selection != rhs.selection) || 25 (this->selection != rhs.selection) ||
25 (this->underlines.size() != rhs.underlines.size())) 26 (this->underlines.size() != rhs.underlines.size()))
26 return false; 27 return false;
27 for (size_t i = 0; i < this->underlines.size(); ++i) { 28 for (size_t i = 0; i < this->underlines.size(); ++i) {
28 if (this->underlines[i] != rhs.underlines[i]) 29 if (this->underlines[i] != rhs.underlines[i])
29 return false; 30 return false;
(...skipping 20 matching lines...) Expand all
50 // Selection range in the composition text. It represents the caret position 51 // Selection range in the composition text. It represents the caret position
51 // if the range length is zero. Usually it's used for representing the target 52 // if the range length is zero. Usually it's used for representing the target
52 // clause (on Windows). Gtk doesn't have such concept, so background color is 53 // clause (on Windows). Gtk doesn't have such concept, so background color is
53 // usually used instead. 54 // usually used instead.
54 gfx::Range selection; 55 gfx::Range selection;
55 }; 56 };
56 57
57 } // namespace ui 58 } // namespace ui
58 59
59 #endif // UI_BASE_IME_COMPOSITION_TEXT_H_ 60 #endif // UI_BASE_IME_COMPOSITION_TEXT_H_
OLDNEW
« no previous file with comments | « tools/gn/bundle_file_rule.cc ('k') | ui/base/ime/composition_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698