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/ui/extensions/application_launch.h" | 5 #include "chrome/browser/ui/extensions/application_launch.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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 const gfx::Rect& override_bounds = params.override_bounds; | 332 const gfx::Rect& override_bounds = params.override_bounds; |
333 | 333 |
334 WebContents* tab = NULL; | 334 WebContents* tab = NULL; |
335 ExtensionPrefs* prefs = extensions::ExtensionSystem::Get(profile)-> | 335 ExtensionPrefs* prefs = extensions::ExtensionSystem::Get(profile)-> |
336 extension_service()->extension_prefs(); | 336 extension_service()->extension_prefs(); |
337 prefs->SetActiveBit(extension->id(), true); | 337 prefs->SetActiveBit(extension->id(), true); |
338 | 338 |
339 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchContainer", container, 100); | 339 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchContainer", container, 100); |
340 | 340 |
341 if (extension->is_platform_app()) { | 341 if (extension->is_platform_app()) { |
342 extensions::LaunchPlatformApp(profile, extension, params.command_line, | 342 extensions::LaunchPlatformAppWithCommandLine( |
343 params.current_directory); | 343 profile, extension, params.command_line, params.current_directory); |
344 return NULL; | 344 return NULL; |
345 } | 345 } |
346 | 346 |
347 switch (container) { | 347 switch (container) { |
348 case extension_misc::LAUNCH_NONE: { | 348 case extension_misc::LAUNCH_NONE: { |
349 NOTREACHED(); | 349 NOTREACHED(); |
350 break; | 350 break; |
351 } | 351 } |
352 case extension_misc::LAUNCH_PANEL: | 352 case extension_misc::LAUNCH_PANEL: |
353 case extension_misc::LAUNCH_WINDOW: | 353 case extension_misc::LAUNCH_WINDOW: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // OnDidGetApplicationInfo, which calls | 387 // OnDidGetApplicationInfo, which calls |
388 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as | 388 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as |
389 // pending web app action. | 389 // pending web app action. |
390 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( | 390 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( |
391 extensions::TabHelper::UPDATE_SHORTCUT); | 391 extensions::TabHelper::UPDATE_SHORTCUT); |
392 | 392 |
393 return tab; | 393 return tab; |
394 } | 394 } |
395 | 395 |
396 } // namespace chrome | 396 } // namespace chrome |
OLD | NEW |