| 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/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/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 private: | 146 private: |
| 147 // ImeListView: | 147 // ImeListView: |
| 148 void HandleViewClicked(views::View* view) override { | 148 void HandleViewClicked(views::View* view) override { |
| 149 ImeListView::HandleViewClicked(view); | 149 ImeListView::HandleViewClicked(view); |
| 150 if (view == settings_) | 150 if (view == settings_) |
| 151 ShowSettings(); | 151 ShowSettings(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void HandleButtonPressed(views::Button* sender, | 154 void HandleButtonPressed(views::Button* sender, |
| 155 const ui::Event& event) override { | 155 const ui::Event& event) override { |
| 156 ImeListView::HandleButtonPressed(sender, event); |
| 156 if (sender == settings_button_) | 157 if (sender == settings_button_) |
| 157 ShowSettings(); | 158 ShowSettings(); |
| 158 } | 159 } |
| 159 | 160 |
| 160 void CreateExtraTitleRowButtons() override { | 161 void CreateExtraTitleRowButtons() override { |
| 161 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { | 162 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { |
| 162 // It is possible that the settings button has already been created | 163 // It is possible that the settings button has already been created |
| 163 // through a previous call to Update(). | 164 // through a previous call to Update(). |
| 164 if (settings_button_) | 165 if (settings_button_) |
| 165 return; | 166 return; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 else | 343 else |
| 343 Update(); | 344 Update(); |
| 344 } | 345 } |
| 345 | 346 |
| 346 bool TrayIME::ShouldDefaultViewBeVisible() { | 347 bool TrayIME::ShouldDefaultViewBeVisible() { |
| 347 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || | 348 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || |
| 348 ShouldShowKeyboardToggle()); | 349 ShouldShowKeyboardToggle()); |
| 349 } | 350 } |
| 350 | 351 |
| 351 } // namespace ash | 352 } // namespace ash |
| OLD | NEW |