| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 bool selected_; | 71 bool selected_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(SelectableHoverHighlightView); | 73 DISALLOW_COPY_AND_ASSIGN(SelectableHoverHighlightView); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class IMEDefaultView : public TrayItemMore { | 76 class IMEDefaultView : public TrayItemMore { |
| 77 public: | 77 public: |
| 78 IMEDefaultView(SystemTrayItem* owner, const base::string16& label) | 78 IMEDefaultView(SystemTrayItem* owner, const base::string16& label) |
| 79 : TrayItemMore(owner, true) { | 79 : TrayItemMore(owner) { |
| 80 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { | 80 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { |
| 81 SetImage(gfx::CreateVectorIcon(kSystemMenuKeyboardIcon, kMenuIconColor)); | 81 SetImage(gfx::CreateVectorIcon(kSystemMenuKeyboardIcon, kMenuIconColor)); |
| 82 } else { | 82 } else { |
| 83 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 83 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 84 SetImage(*bundle.GetImageNamed(IDR_AURA_UBER_TRAY_IME).ToImageSkia()); | 84 SetImage(*bundle.GetImageNamed(IDR_AURA_UBER_TRAY_IME).ToImageSkia()); |
| 85 } | 85 } |
| 86 UpdateLabel(label); | 86 UpdateLabel(label); |
| 87 } | 87 } |
| 88 | 88 |
| 89 ~IMEDefaultView() override {} | 89 ~IMEDefaultView() override {} |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 return ime_count >= threshold; | 376 return ime_count >= threshold; |
| 377 } | 377 } |
| 378 | 378 |
| 379 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { | 379 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { |
| 380 // If managed, we also want to show a single IME. | 380 // If managed, we also want to show a single IME. |
| 381 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME | 381 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME |
| 382 : ImeListView::HIDE_SINGLE_IME; | 382 : ImeListView::HIDE_SINGLE_IME; |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace ash | 385 } // namespace ash |
| OLD | NEW |