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

Side by Side Diff: ash/common/system/tray_accessibility.cc

Issue 2395523002: chromeos: Refactor system tray "show settings" commands to use mojo (Closed)
Patch Set: Created 4 years, 2 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/tray_accessibility.h" 5 #include "ash/common/system/tray_accessibility.h"
6 6
7 #include "ash/common/accessibility_delegate.h" 7 #include "ash/common/accessibility_delegate.h"
8 #include "ash/common/accessibility_types.h" 8 #include "ash/common/accessibility_types.h"
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"
11 #include "ash/common/system/tray/hover_highlight_view.h" 11 #include "ash/common/system/tray/hover_highlight_view.h"
12 #include "ash/common/system/tray/system_tray.h" 12 #include "ash/common/system/tray/system_tray.h"
13 #include "ash/common/system/tray/system_tray_controller.h"
13 #include "ash/common/system/tray/system_tray_delegate.h" 14 #include "ash/common/system/tray/system_tray_delegate.h"
14 #include "ash/common/system/tray/system_tray_notifier.h" 15 #include "ash/common/system/tray/system_tray_notifier.h"
15 #include "ash/common/system/tray/tray_constants.h" 16 #include "ash/common/system/tray/tray_constants.h"
16 #include "ash/common/system/tray/tray_details_view.h" 17 #include "ash/common/system/tray/tray_details_view.h"
17 #include "ash/common/system/tray/tray_item_more.h" 18 #include "ash/common/system/tray/tray_item_more.h"
18 #include "ash/common/system/tray/tray_popup_item_style.h" 19 #include "ash/common/system/tray/tray_popup_item_style.h"
19 #include "ash/common/system/tray/tray_popup_label_button.h" 20 #include "ash/common/system/tray/tray_popup_label_button.h"
20 #include "ash/common/wm_shell.h" 21 #include "ash/common/wm_shell.h"
21 #include "ash/resources/vector_icons/vector_icons.h" 22 #include "ash/resources/vector_icons/vector_icons.h"
22 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return; 318 return;
318 } 319 }
319 WmShell::Get()->RecordUserMetricsAction(user_action); 320 WmShell::Get()->RecordUserMetricsAction(user_action);
320 } 321 }
321 322
322 void AccessibilityDetailedView::HandleButtonPressed(views::Button* sender, 323 void AccessibilityDetailedView::HandleButtonPressed(views::Button* sender,
323 const ui::Event& event) { 324 const ui::Event& event) {
324 if (MaterialDesignController::UseMaterialDesignSystemIcons()) 325 if (MaterialDesignController::UseMaterialDesignSystemIcons())
325 return; 326 return;
326 327
327 SystemTrayDelegate* tray_delegate = WmShell::Get()->system_tray_delegate(); 328 SystemTrayController* controller = WmShell::Get()->system_tray_controller();
328 if (sender == help_view_) 329 if (sender == help_view_)
329 tray_delegate->ShowAccessibilityHelp(); 330 controller->ShowAccessibilityHelp();
330 else if (sender == settings_view_) 331 else if (sender == settings_view_)
331 tray_delegate->ShowAccessibilitySettings(); 332 controller->ShowAccessibilitySettings();
332 else 333 else
333 return; 334 return;
334 owner()->system_tray()->CloseSystemBubble(); 335 owner()->system_tray()->CloseSystemBubble();
335 } 336 }
336 337
337 } // namespace tray 338 } // namespace tray
338 339
339 //////////////////////////////////////////////////////////////////////////////// 340 ////////////////////////////////////////////////////////////////////////////////
340 // ash::TrayAccessibility 341 // ash::TrayAccessibility
341 342
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 if (detailed_popup_) 457 if (detailed_popup_)
457 detailed_popup_->GetWidget()->Close(); 458 detailed_popup_->GetWidget()->Close();
458 if (detailed_menu_) 459 if (detailed_menu_)
459 detailed_menu_->GetWidget()->Close(); 460 detailed_menu_->GetWidget()->Close();
460 } 461 }
461 462
462 previous_accessibility_state_ = accessibility_state; 463 previous_accessibility_state_ = accessibility_state;
463 } 464 }
464 465
465 } // namespace ash 466 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698