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

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

Issue 2699443004: Modify TrayItemMore to use enabled status (Closed)
Patch Set: Removed non-MD Created 3 years, 10 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/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
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 return ime_count >= threshold; 375 return ime_count >= threshold;
376 } 376 }
377 377
378 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { 378 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() {
379 // If managed, we also want to show a single IME. 379 // If managed, we also want to show a single IME.
380 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME 380 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME
381 : ImeListView::HIDE_SINGLE_IME; 381 : ImeListView::HIDE_SINGLE_IME;
382 } 382 }
383 383
384 } // namespace ash 384 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698