Revert of Reland debugging for ipc related crash. (patchset #1 id:1 of https://codere...
[chromium-blink-merge.git] / ui / chromeos / ime / input_method_menu_item.cc
blob09ae8a31c27cbe98de3c279362dee07a804a81b7
1 // Copyright 2014 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/chromeos/ime/input_method_menu_item.h"
7 #include <sstream>
9 #include "base/logging.h"
11 namespace ui {
12 namespace ime {
14 InputMethodMenuItem::InputMethodMenuItem(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());
25 InputMethodMenuItem::InputMethodMenuItem()
26 : is_selection_item(false),
27 is_selection_item_checked(false) {
30 InputMethodMenuItem::~InputMethodMenuItem() {
33 bool InputMethodMenuItem::operator==(const InputMethodMenuItem& 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;
40 bool InputMethodMenuItem::operator!=(const InputMethodMenuItem& other) const {
41 return !(*this == other);
44 std::string InputMethodMenuItem::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();
53 } // namespace ime
54 } // namespace ui