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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_property.h

Issue 10025015: Add operator= to InputMethodProperty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added operator!= per offline discussion Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_property.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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_PROPERTY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_PROPERTY_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_PROPERTY_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_PROPERTY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 namespace chromeos { 12 namespace chromeos {
13 namespace input_method { 13 namespace input_method {
14 14
15 // A structure which represents a property for an input method engine. 15 // A structure which represents a property for an input method engine.
16 struct InputMethodProperty { 16 struct InputMethodProperty {
17 InputMethodProperty(const std::string& in_key, 17 InputMethodProperty(const std::string& in_key,
18 const std::string& in_label, 18 const std::string& in_label,
19 bool in_is_selection_item, 19 bool in_is_selection_item,
20 bool in_is_selection_item_checked, 20 bool in_is_selection_item_checked,
21 int in_selection_item_id); 21 int in_selection_item_id);
22 22
23 InputMethodProperty(); 23 InputMethodProperty();
24 ~InputMethodProperty(); 24 ~InputMethodProperty();
25 25
26 bool operator==(const InputMethodProperty& other) const;
27 bool operator!=(const InputMethodProperty& other) const;
28
26 // Debug print function. 29 // Debug print function.
27 std::string ToString() const; 30 std::string ToString() const;
28 31
29 std::string key; // A key which identifies the property. Non-empty string. 32 std::string key; // A key which identifies the property. Non-empty string.
30 // (e.g. "InputMode.HalfWidthKatakana") 33 // (e.g. "InputMode.HalfWidthKatakana")
31 std::string label; // A description of the property. Non-empty string. 34 std::string label; // A description of the property. Non-empty string.
32 // (e.g. "Switch to full punctuation mode", "Hiragana") 35 // (e.g. "Switch to full punctuation mode", "Hiragana")
33 bool is_selection_item; // true if the property is a selection item. 36 bool is_selection_item; // true if the property is a selection item.
34 bool is_selection_item_checked; // true if |is_selection_item| is true and 37 bool is_selection_item_checked; // true if |is_selection_item| is true and
35 // the selection_item is selected. 38 // the selection_item is selected.
36 int selection_item_id; // A group ID (>= 0) of the selection item. 39 int selection_item_id; // A group ID (>= 0) of the selection item.
37 // kInvalidSelectionItemId if |is_selection_item| is 40 // kInvalidSelectionItemId if |is_selection_item| is
38 // false. 41 // false.
39 static const int kInvalidSelectionItemId = -1; 42 static const int kInvalidSelectionItemId = -1;
40 }; 43 };
41 typedef std::vector<InputMethodProperty> InputMethodPropertyList; 44 typedef std::vector<InputMethodProperty> InputMethodPropertyList;
42 45
43 } // namespace input_method 46 } // namespace input_method
44 } // namespace chromeos 47 } // namespace chromeos
45 48
46 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_PROPERTY_H_ 49 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_PROPERTY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698