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

Side by Side Diff: ash/common/system/chromeos/ime_menu/ime_list_view.cc

Issue 2497813002: Modify Ash MD system menu layout for title rows (Closed)
Patch Set: Ben comments Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/ime_menu/ime_list_view.h" 5 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
6 6
7 #include "ash/common/ash_view_ids.h" 7 #include "ash/common/ash_view_ids.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/system/tray/hover_highlight_view.h" 9 #include "ash/common/system/tray/hover_highlight_view.h"
10 #include "ash/common/system/tray/ime_info.h" 10 #include "ash/common/system/tray/ime_info.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // The on-screen keyboard label. 218 // The on-screen keyboard label.
219 label_ = TrayPopupUtils::CreateDefaultLabel(); 219 label_ = TrayPopupUtils::CreateDefaultLabel();
220 label_->SetText(ui::ResourceBundle::GetSharedInstance().GetLocalizedString( 220 label_->SetText(ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
221 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD)); 221 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD));
222 UpdateStyle(); 222 UpdateStyle();
223 tri_view->AddView(TriView::Container::CENTER, label_); 223 tri_view->AddView(TriView::Container::CENTER, label_);
224 224
225 // The on-screen keyboard toggle button. 225 // The on-screen keyboard toggle button.
226 toggle_ = new views::ToggleButton(listener_); 226 toggle_ = new views::ToggleButton(listener_);
227 toggle_->SetFocusForPlatform(); 227 toggle_->SetFocusForPlatform();
228 toggle_->SetTooltipText( 228 toggle_->SetAccessibleName(
229 ui::ResourceBundle::GetSharedInstance().GetLocalizedString( 229 ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
230 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD)); 230 IDS_ASH_STATUS_TRAY_ACCESSIBILITY_VIRTUAL_KEYBOARD));
231 tri_view->AddView(TriView::Container::END, toggle_); 231 tri_view->AddView(TriView::Container::END, toggle_);
232 232
233 set_id(VIEW_ID_STICKY_HEADER); 233 set_id(VIEW_ID_STICKY_HEADER);
234 } 234 }
235 235
236 // Updates the style of |label_| based on the current native theme. 236 // Updates the style of |label_| based on the current native theme.
237 void UpdateStyle() { 237 void UpdateStyle() {
238 TrayPopupItemStyle style( 238 TrayPopupItemStyle style(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 411 }
412 412
413 void ImeListView::HandleButtonPressed(views::Button* sender, 413 void ImeListView::HandleButtonPressed(views::Button* sender,
414 const ui::Event& event) { 414 const ui::Event& event) {
415 DCHECK(material_keyboard_status_view_); 415 DCHECK(material_keyboard_status_view_);
416 DCHECK_EQ(sender, material_keyboard_status_view_->toggle()); 416 DCHECK_EQ(sender, material_keyboard_status_view_->toggle());
417 WmShell::Get()->ToggleIgnoreExternalKeyboard(); 417 WmShell::Get()->ToggleIgnoreExternalKeyboard();
418 } 418 }
419 419
420 } // namespace ash 420 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698