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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2343 return false; | 2343 return false; |
2344 } | 2344 } |
2345 | 2345 |
2346 // no client (silent install) | 2346 // no client (silent install) |
2347 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, NULL)); | 2347 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, NULL)); |
2348 installer->set_install_source(location); | 2348 installer->set_install_source(location); |
2349 installer->set_expected_id(id); | 2349 installer->set_expected_id(id); |
2350 installer->set_expected_version(*version); | 2350 installer->set_expected_version(*version); |
2351 installer->set_install_cause(extension_misc::INSTALL_CAUSE_EXTERNAL_FILE); | 2351 installer->set_install_cause(extension_misc::INSTALL_CAUSE_EXTERNAL_FILE); |
2352 installer->set_creation_flags(creation_flags); | 2352 installer->set_creation_flags(creation_flags); |
| 2353 #if defined(OS_CHROMEOS) |
| 2354 // Preload default app icons so that they could be display timely in launcher |
| 2355 // bar. See http://crbug.com/146114 |
| 2356 const int kLauncherIconSizes[] = { 32, 64 }; |
| 2357 installer->set_preload_sizes( |
| 2358 std::set<int>(kLauncherIconSizes, |
| 2359 kLauncherIconSizes + arraysize(kLauncherIconSizes))); |
| 2360 #endif |
2353 installer->InstallCrx(path); | 2361 installer->InstallCrx(path); |
2354 | 2362 |
2355 // Depending on the source, a new external extension might not need a user | 2363 // Depending on the source, a new external extension might not need a user |
2356 // notification on installation. For such extensions, mark them acknowledged | 2364 // notification on installation. For such extensions, mark them acknowledged |
2357 // now to suppress the notification. | 2365 // now to suppress the notification. |
2358 if (mark_acknowledged) | 2366 if (mark_acknowledged) |
2359 AcknowledgeExternalExtension(id); | 2367 AcknowledgeExternalExtension(id); |
2360 | 2368 |
2361 return true; | 2369 return true; |
2362 } | 2370 } |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2665 extension_host->extension(), | 2673 extension_host->extension(), |
2666 NULL, FilePath()); | 2674 NULL, FilePath()); |
2667 #endif | 2675 #endif |
2668 } | 2676 } |
2669 | 2677 |
2670 void ExtensionService::InspectExtensionHost( | 2678 void ExtensionService::InspectExtensionHost( |
2671 extensions::ExtensionHost* host) { | 2679 extensions::ExtensionHost* host) { |
2672 if (host) | 2680 if (host) |
2673 DevToolsWindow::OpenDevToolsWindow(host->render_view_host()); | 2681 DevToolsWindow::OpenDevToolsWindow(host->render_view_host()); |
2674 } | 2682 } |
OLD | NEW |