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

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

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 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 "ash/audio/sounds.h" 7 #include "ash/audio/sounds.h"
8 #include "ash/autoclick/autoclick_controller.h" 8 #include "ash/autoclick/autoclick_controller.h"
9 #include "ash/high_contrast/high_contrast_controller.h" 9 #include "ash/high_contrast/high_contrast_controller.h"
10 #include "ash/metrics/user_metrics_recorder.h" 10 #include "ash/metrics/user_metrics_recorder.h"
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 if (system_sounds_enabled_) 1100 if (system_sounds_enabled_)
1101 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_ENABLED); 1101 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_ENABLED);
1102 1102
1103 if (chrome_vox_loaded_on_lock_screen_ || 1103 if (chrome_vox_loaded_on_lock_screen_ ||
1104 should_speak_chrome_vox_announcements_on_user_screen_) { 1104 should_speak_chrome_vox_announcements_on_user_screen_) {
1105 extensions::EventRouter* event_router = 1105 extensions::EventRouter* event_router =
1106 extensions::EventRouter::Get(profile); 1106 extensions::EventRouter::Get(profile);
1107 CHECK(event_router); 1107 CHECK(event_router);
1108 1108
1109 scoped_ptr<base::ListValue> event_args(new base::ListValue()); 1109 scoped_ptr<base::ListValue> event_args(new base::ListValue());
1110 scoped_ptr<extensions::Event> event( 1110 scoped_ptr<extensions::Event> event(new extensions::Event(
1111 new extensions::Event(extensions::api::accessibility_private:: 1111 extensions::events::UNKNOWN, extensions::api::accessibility_private::
1112 OnIntroduceChromeVox::kEventName, 1112 OnIntroduceChromeVox::kEventName,
1113 event_args.Pass())); 1113 event_args.Pass()));
1114 event_router->DispatchEventWithLazyListener( 1114 event_router->DispatchEventWithLazyListener(
1115 extension_misc::kChromeVoxExtensionId, event.Pass()); 1115 extension_misc::kChromeVoxExtensionId, event.Pass());
1116 } 1116 }
1117 1117
1118 should_speak_chrome_vox_announcements_on_user_screen_ = 1118 should_speak_chrome_vox_announcements_on_user_screen_ =
1119 chrome_vox_loaded_on_lock_screen_; 1119 chrome_vox_loaded_on_lock_screen_;
1120 } 1120 }
1121 1121
1122 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { 1122 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) {
1123 // Do any teardown work needed immediately after ChromeVox actually unloads. 1123 // Do any teardown work needed immediately after ChromeVox actually unloads.
1124 if (system_sounds_enabled_) 1124 if (system_sounds_enabled_)
1125 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); 1125 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED);
1126 // Clear the accessibility focus ring. 1126 // Clear the accessibility focus ring.
1127 AccessibilityFocusRingController::GetInstance()->SetFocusRing( 1127 AccessibilityFocusRingController::GetInstance()->SetFocusRing(
1128 std::vector<gfx::Rect>()); 1128 std::vector<gfx::Rect>());
1129 } 1129 }
1130 1130
1131 } // namespace chromeos 1131 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/apps/ephemeral_app_browsertest.cc ('k') | chrome/browser/chromeos/extensions/dictionary_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698