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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 2099443002: Migrate simple ash Shell metrics users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile error. Created 4 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <utility> 11 #include <utility>
12 12
13 #include "ash/audio/sounds.h" 13 #include "ash/audio/sounds.h"
14 #include "ash/autoclick/autoclick_controller.h" 14 #include "ash/autoclick/autoclick_controller.h"
15 #include "ash/common/session/session_state_delegate.h" 15 #include "ash/common/session/session_state_delegate.h"
16 #include "ash/common/wm_shell.h"
16 #include "ash/high_contrast/high_contrast_controller.h" 17 #include "ash/high_contrast/high_contrast_controller.h"
17 #include "ash/metrics/user_metrics_recorder.h"
18 #include "ash/root_window_controller.h" 18 #include "ash/root_window_controller.h"
19 #include "ash/shelf/shelf.h" 19 #include "ash/shelf/shelf.h"
20 #include "ash/shelf/shelf_layout_manager.h" 20 #include "ash/shelf/shelf_layout_manager.h"
21 #include "ash/shell.h" 21 #include "ash/shell.h"
22 #include "ash/sticky_keys/sticky_keys_controller.h" 22 #include "ash/sticky_keys/sticky_keys_controller.h"
23 #include "ash/system/tray/system_tray_notifier.h" 23 #include "ash/system/tray/system_tray_notifier.h"
24 #include "base/callback.h" 24 #include "base/callback.h"
25 #include "base/callback_helpers.h" 25 #include "base/callback_helpers.h"
26 #include "base/command_line.h" 26 #include "base/command_line.h"
27 #include "base/macros.h" 27 #include "base/macros.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 sticky_keys_enabled_ = enabled; 582 sticky_keys_enabled_ = enabled;
583 ash::Shell::GetInstance()->sticky_keys_controller()->Enable(enabled); 583 ash::Shell::GetInstance()->sticky_keys_controller()->Enable(enabled);
584 } 584 }
585 585
586 void AccessibilityManager::EnableSpokenFeedback( 586 void AccessibilityManager::EnableSpokenFeedback(
587 bool enabled, 587 bool enabled,
588 ash::AccessibilityNotificationVisibility notify) { 588 ash::AccessibilityNotificationVisibility notify) {
589 if (!profile_) 589 if (!profile_)
590 return; 590 return;
591 ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction( 591 ash::WmShell::Get()->RecordUserMetricsAction(
592 enabled ? ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK 592 enabled ? ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK
593 : ash::UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK); 593 : ash::UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK);
594 594
595 spoken_feedback_notification_ = notify; 595 spoken_feedback_notification_ = notify;
596 596
597 PrefService* pref_service = profile_->GetPrefs(); 597 PrefService* pref_service = profile_->GetPrefs();
598 pref_service->SetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled, enabled); 598 pref_service->SetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled, enabled);
599 pref_service->CommitPendingWrite(); 599 pref_service->CommitPendingWrite();
600 600
601 spoken_feedback_notification_ = ash::A11Y_NOTIFICATION_NONE; 601 spoken_feedback_notification_ = ash::A11Y_NOTIFICATION_NONE;
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 content::BrowserContext* context) { 1528 content::BrowserContext* context) {
1529 keyboard_listener_extension_id_ = id; 1529 keyboard_listener_extension_id_ = id;
1530 1530
1531 extensions::ExtensionRegistry* registry = 1531 extensions::ExtensionRegistry* registry =
1532 extensions::ExtensionRegistry::Get(context); 1532 extensions::ExtensionRegistry::Get(context);
1533 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1533 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1534 extension_registry_observer_.Add(registry); 1534 extension_registry_observer_.Add(registry);
1535 } 1535 }
1536 1536
1537 } // namespace chromeos 1537 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.cc ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698