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

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

Issue 30833003: Add code to load Hangout Services as a component extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for tryjobs. Created 7 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 | Annotate | Revision Log
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 <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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 command_line->GetSwitchValuePath(switches::kFileManagerExtensionPath)); 278 command_line->GetSwitchValuePath(switches::kFileManagerExtensionPath));
279 Add(IDR_FILEMANAGER_MANIFEST, filemgr_extension_path); 279 Add(IDR_FILEMANAGER_MANIFEST, filemgr_extension_path);
280 return; 280 return;
281 } 281 }
282 #endif // NDEBUG 282 #endif // NDEBUG
283 Add(IDR_FILEMANAGER_MANIFEST, 283 Add(IDR_FILEMANAGER_MANIFEST,
284 base::FilePath(FILE_PATH_LITERAL("file_manager"))); 284 base::FilePath(FILE_PATH_LITERAL("file_manager")));
285 #endif // defined(FILE_MANAGER_EXTENSION) 285 #endif // defined(FILE_MANAGER_EXTENSION)
286 } 286 }
287 287
288 void ComponentLoader::AddHangoutServicesExtension() {
289 Add(IDR_HANGOUT_SERVICES_MANIFEST,
290 base::FilePath(FILE_PATH_LITERAL("hangout_services")));
291 }
292
288 void ComponentLoader::AddImageLoaderExtension() { 293 void ComponentLoader::AddImageLoaderExtension() {
289 #if defined(IMAGE_LOADER_EXTENSION) 294 #if defined(IMAGE_LOADER_EXTENSION)
290 #ifndef NDEBUG 295 #ifndef NDEBUG
291 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 296 const CommandLine* command_line = CommandLine::ForCurrentProcess();
292 if (command_line->HasSwitch(switches::kImageLoaderExtensionPath)) { 297 if (command_line->HasSwitch(switches::kImageLoaderExtensionPath)) {
293 base::FilePath image_loader_extension_path( 298 base::FilePath image_loader_extension_path(
294 command_line->GetSwitchValuePath(switches::kImageLoaderExtensionPath)); 299 command_line->GetSwitchValuePath(switches::kImageLoaderExtensionPath));
295 Add(IDR_IMAGE_LOADER_MANIFEST, image_loader_extension_path); 300 Add(IDR_IMAGE_LOADER_MANIFEST, image_loader_extension_path);
296 return; 301 return;
297 } 302 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 424 }
420 425
421 if (!skip_session_components) { 426 if (!skip_session_components) {
422 // Apps Debugger 427 // Apps Debugger
423 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsDevtool) && 428 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsDevtool) &&
424 profile_prefs_->GetBoolean(prefs::kExtensionsUIDeveloperMode)) { 429 profile_prefs_->GetBoolean(prefs::kExtensionsUIDeveloperMode)) {
425 Add(IDR_APPS_DEBUGGER_MANIFEST, 430 Add(IDR_APPS_DEBUGGER_MANIFEST,
426 base::FilePath(FILE_PATH_LITERAL("apps_debugger"))); 431 base::FilePath(FILE_PATH_LITERAL("apps_debugger")));
427 } 432 }
428 433
434
429 AddFileManagerExtension(); 435 AddFileManagerExtension();
436 AddHangoutServicesExtension();
Yoyo Zhou 2013/10/23 23:24:27 Can this (and other such functions) be in an anony
Jói 2013/10/24 08:23:31 Without some larger changes, they need to be membe
430 AddImageLoaderExtension(); 437 AddImageLoaderExtension();
431 438
432 #if defined(ENABLE_SETTINGS_APP) 439 #if defined(ENABLE_SETTINGS_APP)
433 Add(IDR_SETTINGS_APP_MANIFEST, 440 Add(IDR_SETTINGS_APP_MANIFEST,
434 base::FilePath(FILE_PATH_LITERAL("settings_app"))); 441 base::FilePath(FILE_PATH_LITERAL("settings_app")));
435 #endif 442 #endif
436 } 443 }
437 444
438 // If (!enable_background_extensions_during_testing || this isn't a test) 445 // If (!enable_background_extensions_during_testing || this isn't a test)
439 // install_feedback = false; 446 // install_feedback = false;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 529
523 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 530 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
524 delete component->manifest; 531 delete component->manifest;
525 if (extension_service_->is_ready()) { 532 if (extension_service_->is_ready()) {
526 extension_service_-> 533 extension_service_->
527 RemoveComponentExtension(component->extension_id); 534 RemoveComponentExtension(component->extension_id);
528 } 535 }
529 } 536 }
530 537
531 } // namespace extensions 538 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | chrome/browser/resources/hangout_services/icon_128.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698