| 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/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" | 10 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 bool selected_; | 63 bool selected_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(SelectableHoverHighlightView); | 65 DISALLOW_COPY_AND_ASSIGN(SelectableHoverHighlightView); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 class IMEDefaultView : public TrayItemMore { | 68 class IMEDefaultView : public TrayItemMore { |
| 69 public: | 69 public: |
| 70 explicit IMEDefaultView(SystemTrayItem* owner, const base::string16& label) | 70 explicit IMEDefaultView(SystemTrayItem* owner, const base::string16& label) |
| 71 : TrayItemMore(owner, true) { | 71 : TrayItemMore(owner, true) { |
| 72 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 72 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 73 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_IME).ToImageSkia()); | 73 SetImage(*bundle.GetImageNamed(IDR_AURA_UBER_TRAY_IME).ToImageSkia()); |
| 74 UpdateLabel(label); | 74 UpdateLabel(label); |
| 75 } | 75 } |
| 76 | 76 |
| 77 ~IMEDefaultView() override {} | 77 ~IMEDefaultView() override {} |
| 78 | 78 |
| 79 void UpdateLabel(const base::string16& label) { | 79 void UpdateLabel(const base::string16& label) { |
| 80 SetLabel(label); | 80 SetLabel(label); |
| 81 SetAccessibleName(label); | 81 SetAccessibleName(label); |
| 82 } | 82 } |
| 83 | 83 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 else | 292 else |
| 293 Update(); | 293 Update(); |
| 294 } | 294 } |
| 295 | 295 |
| 296 bool TrayIME::ShouldDefaultViewBeVisible() { | 296 bool TrayIME::ShouldDefaultViewBeVisible() { |
| 297 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || | 297 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || |
| 298 ShouldShowKeyboardToggle()); | 298 ShouldShowKeyboardToggle()); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace ash | 301 } // namespace ash |
| OLD | NEW |