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

Side by Side Diff: ash/common/system/ime/tray_ime_chromeos.cc

Issue 2805733002: [Ash] Use DCHECK in ImeListView::HandleButtonPressed() (Closed)
Patch Set: Created 3 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
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 #include "ash/common/system/ime/tray_ime_chromeos.h" 5 #include "ash/common/system/ime/tray_ime_chromeos.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return ime_count >= threshold; 302 return ime_count >= threshold;
302 } 303 }
303 304
304 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { 305 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() {
305 // If managed, we also want to show a single IME. 306 // If managed, we also want to show a single IME.
306 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME 307 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME
307 : ImeListView::HIDE_SINGLE_IME; 308 : ImeListView::HIDE_SINGLE_IME;
308 } 309 }
309 310
310 } // namespace ash 311 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698