| OLD | NEW |
| (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 int in_selection_item_id) |
| 19 : key(in_key), |
| 20 label(in_label), |
| 21 is_selection_item(in_is_selection_item), |
| 22 is_selection_item_checked(in_is_selection_item_checked), |
| 23 selection_item_id(in_selection_item_id) { |
| 24 DCHECK(!key.empty()); |
| 25 } |
| 26 |
| 27 InputMethodProperty::InputMethodProperty() |
| 28 : is_selection_item(false), |
| 29 is_selection_item_checked(false), |
| 30 selection_item_id(kInvalidSelectionItemId) { |
| 31 } |
| 32 |
| 33 InputMethodProperty::~InputMethodProperty() { |
| 34 } |
| 35 |
| 36 std::string InputMethodProperty::ToString() const { |
| 37 std::stringstream stream; |
| 38 stream << "key=" << key |
| 39 << ", label=" << label |
| 40 << ", is_selection_item=" << is_selection_item |
| 41 << ", is_selection_item_checked=" << is_selection_item_checked |
| 42 << ", selection_item_id=" << selection_item_id; |
| 43 return stream.str(); |
| 44 } |
| 45 |
| 46 } // namespace input_method |
| 47 } // namespace chromeos |
| OLD | NEW |