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

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

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ash/shelf/shelf_widget.cc for browser_tests crash... Created 4 years, 9 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 #include <utility> 9 #include <utility>
10 10
11 #include "ash/audio/sounds.h" 11 #include "ash/audio/sounds.h"
12 #include "ash/autoclick/autoclick_controller.h" 12 #include "ash/autoclick/autoclick_controller.h"
13 #include "ash/high_contrast/high_contrast_controller.h" 13 #include "ash/high_contrast/high_contrast_controller.h"
14 #include "ash/metrics/user_metrics_recorder.h" 14 #include "ash/metrics/user_metrics_recorder.h"
15 #include "ash/session/session_state_delegate.h" 15 #include "ash/session/session_state_delegate.h"
16 #include "ash/shelf/shelf.h"
16 #include "ash/shelf/shelf_layout_manager.h" 17 #include "ash/shelf/shelf_layout_manager.h"
17 #include "ash/shell.h" 18 #include "ash/shell.h"
18 #include "ash/sticky_keys/sticky_keys_controller.h" 19 #include "ash/sticky_keys/sticky_keys_controller.h"
19 #include "ash/system/tray/system_tray_notifier.h" 20 #include "ash/system/tray/system_tray_notifier.h"
20 #include "base/callback.h" 21 #include "base/callback.h"
21 #include "base/callback_helpers.h" 22 #include "base/callback_helpers.h"
22 #include "base/command_line.h" 23 #include "base/command_line.h"
23 #include "base/macros.h" 24 #include "base/macros.h"
24 #include "base/memory/scoped_ptr.h" 25 #include "base/memory/scoped_ptr.h"
25 #include "base/memory/singleton.h" 26 #include "base/memory/singleton.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); 1215 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED);
1215 // Clear the accessibility focus ring. 1216 // Clear the accessibility focus ring.
1216 AccessibilityFocusRingController::GetInstance()->SetFocusRing( 1217 AccessibilityFocusRingController::GetInstance()->SetFocusRing(
1217 std::vector<gfx::Rect>()); 1218 std::vector<gfx::Rect>());
1218 } 1219 }
1219 1220
1220 void AccessibilityManager::OnChromeVoxPanelClosing() { 1221 void AccessibilityManager::OnChromeVoxPanelClosing() {
1221 aura::Window* root_window = chromevox_panel_->GetRootWindow(); 1222 aura::Window* root_window = chromevox_panel_->GetRootWindow();
1222 chromevox_panel_widget_observer_.reset(nullptr); 1223 chromevox_panel_widget_observer_.reset(nullptr);
1223 chromevox_panel_ = nullptr; 1224 chromevox_panel_ = nullptr;
1224 ash::ShelfLayoutManager::ForShelf(root_window)->SetChromeVoxPanelHeight(0); 1225 ash::Shelf::ForWindow(root_window)
1226 ->shelf_layout_manager()
1227 ->SetChromeVoxPanelHeight(0);
1225 } 1228 }
1226 1229
1227 void AccessibilityManager::OnChromeVoxPanelDestroying() { 1230 void AccessibilityManager::OnChromeVoxPanelDestroying() {
1228 chromevox_panel_widget_observer_.reset(nullptr); 1231 chromevox_panel_widget_observer_.reset(nullptr);
1229 chromevox_panel_ = nullptr; 1232 chromevox_panel_ = nullptr;
1230 } 1233 }
1231 1234
1232 void AccessibilityManager::SetKeyboardListenerExtensionId( 1235 void AccessibilityManager::SetKeyboardListenerExtensionId(
1233 const std::string& id, 1236 const std::string& id,
1234 content::BrowserContext* context) { 1237 content::BrowserContext* context) {
1235 keyboard_listener_extension_id_ = id; 1238 keyboard_listener_extension_id_ = id;
1236 1239
1237 extensions::ExtensionRegistry* registry = 1240 extensions::ExtensionRegistry* registry =
1238 extensions::ExtensionRegistry::Get(context); 1241 extensions::ExtensionRegistry::Get(context);
1239 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1242 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1240 extension_registry_observer_.Add(registry); 1243 extension_registry_observer_.Add(registry);
1241 } 1244 }
1242 1245
1243 } // namespace chromeos 1246 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_unittest.cc ('k') | chrome/browser/chromeos/accessibility/chromevox_panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698