| OLD | NEW |
| 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 #include "ash/system/ime/tray_ime_chromeos.h" | 5 #include "ash/system/ime/tray_ime_chromeos.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/resources/vector_icons/vector_icons.h" | 9 #include "ash/resources/vector_icons/vector_icons.h" |
| 10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 private: | 96 private: |
| 97 // ImeListView: | 97 // ImeListView: |
| 98 void ResetImeListView() override { | 98 void ResetImeListView() override { |
| 99 ImeListView::ResetImeListView(); | 99 ImeListView::ResetImeListView(); |
| 100 settings_button_ = nullptr; | 100 settings_button_ = nullptr; |
| 101 controlled_setting_icon_ = nullptr; | 101 controlled_setting_icon_ = nullptr; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void HandleButtonPressed(views::Button* sender, | 104 void HandleButtonPressed(views::Button* sender, |
| 105 const ui::Event& event) override { | 105 const ui::Event& event) override { |
| 106 ImeListView::HandleButtonPressed(sender, event); | |
| 107 if (sender == settings_button_) | 106 if (sender == settings_button_) |
| 108 ShowSettings(); | 107 ShowSettings(); |
| 108 else |
| 109 ImeListView::HandleButtonPressed(sender, event); |
| 109 } | 110 } |
| 110 | 111 |
| 111 void CreateExtraTitleRowButtons() override { | 112 void CreateExtraTitleRowButtons() override { |
| 112 if (!ime_managed_message_.empty()) { | 113 if (!ime_managed_message_.empty()) { |
| 113 controlled_setting_icon_ = TrayPopupUtils::CreateMainImageView(); | 114 controlled_setting_icon_ = TrayPopupUtils::CreateMainImageView(); |
| 114 controlled_setting_icon_->SetImage( | 115 controlled_setting_icon_->SetImage( |
| 115 gfx::CreateVectorIcon(kSystemMenuBusinessIcon, kMenuIconColor)); | 116 gfx::CreateVectorIcon(kSystemMenuBusinessIcon, kMenuIconColor)); |
| 116 controlled_setting_icon_->SetTooltipText(ime_managed_message_); | 117 controlled_setting_icon_->SetTooltipText(ime_managed_message_); |
| 117 tri_view()->AddView(TriView::Container::END, controlled_setting_icon_); | 118 tri_view()->AddView(TriView::Container::END, controlled_setting_icon_); |
| 118 } | 119 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 return ime_count >= threshold; | 303 return ime_count >= threshold; |
| 303 } | 304 } |
| 304 | 305 |
| 305 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { | 306 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { |
| 306 // If managed, we also want to show a single IME. | 307 // If managed, we also want to show a single IME. |
| 307 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME | 308 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME |
| 308 : ImeListView::HIDE_SINGLE_IME; | 309 : ImeListView::HIDE_SINGLE_IME; |
| 309 } | 310 } |
| 310 | 311 |
| 311 } // namespace ash | 312 } // namespace ash |
| OLD | NEW |