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

Side by Side Diff: ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc

Issue 2090353005: Revert of tabing inconsistencies between trays in status area (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | ash/system/web_notification/web_notification_tray.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" 5 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
6 6
7 #include "ash/common/keyboard/keyboard_ui.h" 7 #include "ash/common/keyboard/keyboard_ui.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf_util.h" 10 #include "ash/common/shelf/wm_shelf_util.h"
(...skipping 27 matching lines...) Expand all
38 } else { 38 } else {
39 gfx::ImageSkia* image_non_md = 39 gfx::ImageSkia* image_non_md =
40 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 40 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
41 IDR_AURA_UBER_TRAY_VIRTUAL_KEYBOARD); 41 IDR_AURA_UBER_TRAY_VIRTUAL_KEYBOARD);
42 button_->SetImage(views::CustomButton::STATE_NORMAL, image_non_md); 42 button_->SetImage(views::CustomButton::STATE_NORMAL, image_non_md);
43 } 43 }
44 button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 44 button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
45 views::ImageButton::ALIGN_MIDDLE); 45 views::ImageButton::ALIGN_MIDDLE);
46 46
47 tray_container()->AddChildView(button_); 47 tray_container()->AddChildView(button_);
48 button_->SetFocusBehavior(FocusBehavior::NEVER);
49 SetContentsBackground(); 48 SetContentsBackground();
50 // The Shell may not exist in some unit tests. 49 // The Shell may not exist in some unit tests.
51 if (Shell::HasInstance()) 50 if (Shell::HasInstance())
52 Shell::GetInstance()->keyboard_ui()->AddObserver(this); 51 Shell::GetInstance()->keyboard_ui()->AddObserver(this);
53 } 52 }
54 53
55 VirtualKeyboardTray::~VirtualKeyboardTray() { 54 VirtualKeyboardTray::~VirtualKeyboardTray() {
56 // The Shell may not exist in some unit tests. 55 // The Shell may not exist in some unit tests.
57 if (Shell::HasInstance()) 56 if (Shell::HasInstance())
58 Shell::GetInstance()->keyboard_ui()->RemoveObserver(this); 57 Shell::GetInstance()->keyboard_ui()->RemoveObserver(this);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const ui::Event& event) { 105 const ui::Event& event) {
107 DCHECK_EQ(button_, sender); 106 DCHECK_EQ(button_, sender);
108 PerformAction(event); 107 PerformAction(event);
109 } 108 }
110 109
111 void VirtualKeyboardTray::OnKeyboardEnabledStateChanged(bool new_value) { 110 void VirtualKeyboardTray::OnKeyboardEnabledStateChanged(bool new_value) {
112 SetVisible(Shell::GetInstance()->keyboard_ui()->IsEnabled()); 111 SetVisible(Shell::GetInstance()->keyboard_ui()->IsEnabled());
113 } 112 }
114 113
115 } // namespace ash 114 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698