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

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

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 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 (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 "base/callback.h" 7 #include "base/callback.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 30 matching lines...) Expand all
41 #include "components/user_manager/user_manager.h" 41 #include "components/user_manager/user_manager.h"
42 #include "content/public/browser/browser_accessibility_state.h" 42 #include "content/public/browser/browser_accessibility_state.h"
43 #include "content/public/browser/browser_thread.h" 43 #include "content/public/browser/browser_thread.h"
44 #include "content/public/browser/notification_details.h" 44 #include "content/public/browser/notification_details.h"
45 #include "content/public/browser/notification_service.h" 45 #include "content/public/browser/notification_service.h"
46 #include "content/public/browser/notification_source.h" 46 #include "content/public/browser/notification_source.h"
47 #include "content/public/browser/render_process_host.h" 47 #include "content/public/browser/render_process_host.h"
48 #include "content/public/browser/render_view_host.h" 48 #include "content/public/browser/render_view_host.h"
49 #include "content/public/browser/web_contents.h" 49 #include "content/public/browser/web_contents.h"
50 #include "content/public/browser/web_ui.h" 50 #include "content/public/browser/web_ui.h"
51 #include "extensions/browser/extension_registry.h"
51 #include "extensions/browser/extension_system.h" 52 #include "extensions/browser/extension_system.h"
52 #include "extensions/browser/file_reader.h" 53 #include "extensions/browser/file_reader.h"
53 #include "extensions/common/extension.h" 54 #include "extensions/common/extension.h"
54 #include "extensions/common/extension_messages.h" 55 #include "extensions/common/extension_messages.h"
55 #include "extensions/common/extension_resource.h" 56 #include "extensions/common/extension_resource.h"
56 #include "media/audio/sounds/sounds_manager.h" 57 #include "media/audio/sounds/sounds_manager.h"
57 #include "ui/base/resource/resource_bundle.h" 58 #include "ui/base/resource/resource_bundle.h"
58 #include "ui/keyboard/keyboard_controller.h" 59 #include "ui/keyboard/keyboard_controller.h"
59 #include "ui/keyboard/keyboard_util.h" 60 #include "ui/keyboard/keyboard_util.h"
60 61
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 int render_view_id, 192 int render_view_id,
192 const base::Closure& done_cb) { 193 const base::Closure& done_cb) {
193 // Make sure to always run |done_cb|. ChromeVox was loaded even if we end up 194 // Make sure to always run |done_cb|. ChromeVox was loaded even if we end up
194 // not injecting into this particular render view. 195 // not injecting into this particular render view.
195 base::ScopedClosureRunner done_runner(done_cb); 196 base::ScopedClosureRunner done_runner(done_cb);
196 RenderViewHost* render_view_host = 197 RenderViewHost* render_view_host =
197 RenderViewHost::FromID(render_process_id, render_view_id); 198 RenderViewHost::FromID(render_process_id, render_view_id);
198 if (!render_view_host) 199 if (!render_view_host)
199 return; 200 return;
200 const extensions::Extension* extension = 201 const extensions::Extension* extension =
201 extension_service->extensions()->GetByID( 202 extensions::ExtensionRegistry::Get(extension_service->profile())
202 extension_misc::kChromeVoxExtensionId); 203 ->enabled_extensions()
204 .GetByID(extension_misc::kChromeVoxExtensionId);
203 205
204 // Set a flag to tell ChromeVox that it's just been enabled, 206 // Set a flag to tell ChromeVox that it's just been enabled,
205 // so that it won't interrupt our speech feedback enabled message. 207 // so that it won't interrupt our speech feedback enabled message.
206 ExtensionMsg_ExecuteCode_Params params; 208 ExtensionMsg_ExecuteCode_Params params;
207 params.request_id = 0; 209 params.request_id = 0;
208 params.extension_id = extension->id(); 210 params.extension_id = extension->id();
209 params.is_javascript = true; 211 params.is_javascript = true;
210 params.code = "window.INJECTED_AFTER_LOAD = true;"; 212 params.code = "window.INJECTED_AFTER_LOAD = true;";
211 params.run_at = extensions::UserScript::DOCUMENT_IDLE; 213 params.run_at = extensions::UserScript::DOCUMENT_IDLE;
212 params.all_frames = true; 214 params.all_frames = true;
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 // Do any teardown work needed immediately after ChromeVox actually unloads. 1151 // Do any teardown work needed immediately after ChromeVox actually unloads.
1150 if (system_sounds_enabled_) 1152 if (system_sounds_enabled_)
1151 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); 1153 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED);
1152 #endif 1154 #endif
1153 // Clear the accessibility focus ring. 1155 // Clear the accessibility focus ring.
1154 AccessibilityFocusRingController::GetInstance()->SetFocusRing( 1156 AccessibilityFocusRingController::GetInstance()->SetFocusRing(
1155 std::vector<gfx::Rect>()); 1157 std::vector<gfx::Rect>());
1156 } 1158 }
1157 1159
1158 } // namespace chromeos 1160 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/file_manager/file_browser_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698