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

Side by Side Diff: chrome/browser/extensions/component_loader.cc

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 6 years, 4 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) 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 void ComponentLoader::AddDefaultComponentExtensions( 424 void ComponentLoader::AddDefaultComponentExtensions(
425 bool skip_session_components) { 425 bool skip_session_components) {
426 // Do not add component extensions that have background pages here -- add them 426 // Do not add component extensions that have background pages here -- add them
427 // to AddDefaultComponentExtensionsWithBackgroundPages. 427 // to AddDefaultComponentExtensionsWithBackgroundPages.
428 #if defined(OS_CHROMEOS) 428 #if defined(OS_CHROMEOS)
429 chromeos::input_method::InputMethodManager* input_method_manager = 429 chromeos::input_method::InputMethodManager* input_method_manager =
430 chromeos::input_method::InputMethodManager::Get(); 430 chromeos::input_method::InputMethodManager::Get();
431 if (input_method_manager) 431 if (input_method_manager)
432 input_method_manager->InitializeComponentExtension(); 432 input_method_manager->InitializeComponentExtension(
433 Profile::FromBrowserContext(browser_context_));
433 434
434 Add(IDR_MOBILE_MANIFEST, 435 Add(IDR_MOBILE_MANIFEST,
435 base::FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile"))); 436 base::FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile")));
436 437
437 #if defined(GOOGLE_CHROME_BUILD) 438 #if defined(GOOGLE_CHROME_BUILD)
438 if (browser_defaults::enable_help_app) { 439 if (browser_defaults::enable_help_app) {
439 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL( 440 Add(IDR_HELP_MANIFEST, base::FilePath(FILE_PATH_LITERAL(
440 "/usr/share/chromeos-assets/helpapp"))); 441 "/usr/share/chromeos-assets/helpapp")));
441 } 442 }
442 #endif 443 #endif
(...skipping 26 matching lines...) Expand all
469 470
470 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components); 471 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components);
471 } 472 }
472 473
473 void ComponentLoader::AddDefaultComponentExtensionsForKioskMode( 474 void ComponentLoader::AddDefaultComponentExtensionsForKioskMode(
474 bool skip_session_components) { 475 bool skip_session_components) {
475 #if defined(OS_CHROMEOS) 476 #if defined(OS_CHROMEOS)
476 chromeos::input_method::InputMethodManager* input_method_manager = 477 chromeos::input_method::InputMethodManager* input_method_manager =
477 chromeos::input_method::InputMethodManager::Get(); 478 chromeos::input_method::InputMethodManager::Get();
478 if (input_method_manager) 479 if (input_method_manager)
479 input_method_manager->InitializeComponentExtension(); 480 input_method_manager->InitializeComponentExtension(
481 Profile::FromBrowserContext(browser_context_));
480 #endif 482 #endif
481 // No component extension for kiosk app launch splash screen. 483 // No component extension for kiosk app launch splash screen.
482 if (skip_session_components) 484 if (skip_session_components)
483 return; 485 return;
484 486
485 // Component extensions needed for kiosk apps. 487 // Component extensions needed for kiosk apps.
486 AddVideoPlayerExtension(); 488 AddVideoPlayerExtension();
487 AddFileManagerExtension(); 489 AddFileManagerExtension();
488 AddGalleryExtension(); 490 AddGalleryExtension();
489 491
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); 646 off_the_record_context, Extension::GetBaseURLFromExtensionId(id));
645 fileapi::FileSystemContext* file_system_context = 647 fileapi::FileSystemContext* file_system_context =
646 content::BrowserContext::GetStoragePartitionForSite( 648 content::BrowserContext::GetStoragePartitionForSite(
647 off_the_record_context, site)->GetFileSystemContext(); 649 off_the_record_context, site)->GetFileSystemContext();
648 file_system_context->EnableTemporaryFileSystemInIncognito(); 650 file_system_context->EnableTemporaryFileSystemInIncognito();
649 } 651 }
650 #endif 652 #endif
651 } 653 }
652 654
653 } // namespace extensions 655 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698