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

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

Issue 12438013: Move InputMethod misc class from c/b/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/input_method/input_method_property.h"
6
7 #include <sstream>
8
9 #include "base/logging.h"
10
11 namespace chromeos {
12 namespace input_method {
13
14 InputMethodProperty::InputMethodProperty(const std::string& in_key,
15 const std::string& in_label,
16 bool in_is_selection_item,
17 bool in_is_selection_item_checked)
18 : key(in_key),
19 label(in_label),
20 is_selection_item(in_is_selection_item),
21 is_selection_item_checked(in_is_selection_item_checked) {
22 DCHECK(!key.empty());
23 }
24
25 InputMethodProperty::InputMethodProperty()
26 : is_selection_item(false),
27 is_selection_item_checked(false) {
28 }
29
30 InputMethodProperty::~InputMethodProperty() {
31 }
32
33 bool InputMethodProperty::operator==(const InputMethodProperty& other) const {
34 return key == other.key &&
35 label == other.label &&
36 is_selection_item == other.is_selection_item &&
37 is_selection_item_checked == other.is_selection_item_checked;
38 }
39
40 bool InputMethodProperty::operator!=(const InputMethodProperty& other) const {
41 return !(*this == other);
42 }
43
44 std::string InputMethodProperty::ToString() const {
45 std::stringstream stream;
46 stream << "key=" << key
47 << ", label=" << label
48 << ", is_selection_item=" << is_selection_item
49 << ", is_selection_item_checked=" << is_selection_item_checked;
50 return stream.str();
51 }
52
53 } // namespace input_method
54 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698