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