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

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

Issue 2699443004: Modify TrayItemMore to use enabled status (Closed)
Patch Set: Rebased 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
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/tray/tray_item_more.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/tray/tray_item_more.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698