OLD | NEW |
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 "chrome/browser/extensions/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 void ComponentLoader::AddNetworkSpeechSynthesisExtension() { | 323 void ComponentLoader::AddNetworkSpeechSynthesisExtension() { |
324 Add(IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST, | 324 Add(IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST, |
325 base::FilePath(FILE_PATH_LITERAL("network_speech_synthesis"))); | 325 base::FilePath(FILE_PATH_LITERAL("network_speech_synthesis"))); |
326 } | 326 } |
327 | 327 |
328 #if defined(OS_CHROMEOS) | 328 #if defined(OS_CHROMEOS) |
329 std::string ComponentLoader::AddChromeVoxExtension() { | 329 std::string ComponentLoader::AddChromeVoxExtension() { |
330 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 330 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
331 int idr = command_line->HasSwitch(chromeos::switches::kGuestSession) ? | 331 int idr = command_line->HasSwitch(chromeos::switches::kGuestSession) ? |
332 IDR_CHROMEVOX_GUEST_MANIFEST : IDR_CHROMEVOX_MANIFEST; | 332 IDR_CHROMEVOX_GUEST_MANIFEST : IDR_CHROMEVOX_MANIFEST; |
| 333 |
| 334 // TODO(dtseng): Guest mode manifest for ChromeVox Next pending work to |
| 335 // generate manifests. |
| 336 if (command_line->HasSwitch(chromeos::switches::kEnableChromeVoxNext)) |
| 337 idr = IDR_CHROMEVOX2_MANIFEST; |
333 return Add(idr, base::FilePath(extension_misc::kChromeVoxExtensionPath)); | 338 return Add(idr, base::FilePath(extension_misc::kChromeVoxExtensionPath)); |
334 } | 339 } |
335 | 340 |
336 std::string ComponentLoader::AddChromeOsSpeechSynthesisExtension() { | 341 std::string ComponentLoader::AddChromeOsSpeechSynthesisExtension() { |
337 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 342 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
338 int idr = command_line->HasSwitch(chromeos::switches::kGuestSession) ? | 343 int idr = command_line->HasSwitch(chromeos::switches::kGuestSession) ? |
339 IDR_SPEECH_SYNTHESIS_GUEST_MANIFEST : IDR_SPEECH_SYNTHESIS_MANIFEST; | 344 IDR_SPEECH_SYNTHESIS_GUEST_MANIFEST : IDR_SPEECH_SYNTHESIS_MANIFEST; |
340 std::string id = Add(idr, | 345 std::string id = Add(idr, |
341 base::FilePath(extension_misc::kSpeechSynthesisExtensionPath)); | 346 base::FilePath(extension_misc::kSpeechSynthesisExtensionPath)); |
342 EnableFileSystemInGuestMode(id); | 347 EnableFileSystemInGuestMode(id); |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 624 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
620 fileapi::FileSystemContext* file_system_context = | 625 fileapi::FileSystemContext* file_system_context = |
621 content::BrowserContext::GetStoragePartitionForSite( | 626 content::BrowserContext::GetStoragePartitionForSite( |
622 off_the_record_context, site)->GetFileSystemContext(); | 627 off_the_record_context, site)->GetFileSystemContext(); |
623 file_system_context->EnableTemporaryFileSystemInIncognito(); | 628 file_system_context->EnableTemporaryFileSystemInIncognito(); |
624 } | 629 } |
625 #endif | 630 #endif |
626 } | 631 } |
627 | 632 |
628 } // namespace extensions | 633 } // namespace extensions |
OLD | NEW |