| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
| 6 | 6 |
| 7 #include "apps/browser/api/app_runtime/app_runtime_api.h" | 7 #include "apps/browser/api/app_runtime/app_runtime_api.h" |
| 8 #include "apps/browser/file_handler_util.h" | 8 #include "apps/browser/file_handler_util.h" |
| 9 #include "apps/common/api/app_runtime.h" | 9 #include "apps/common/api/app_runtime.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 if (!in_kiosk_mode) { | 404 if (!in_kiosk_mode) { |
| 405 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " | 405 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " |
| 406 << " ChromeOS kiosk mode."; | 406 << " ChromeOS kiosk mode."; |
| 407 NOTREACHED(); | 407 NOTREACHED(); |
| 408 return; | 408 return; |
| 409 } | 409 } |
| 410 } | 410 } |
| 411 | 411 |
| 412 #if defined(OS_WIN) | 412 #if defined(OS_WIN) |
| 413 base::CommandLine::StringType about_blank_url( | 413 base::CommandLine::StringType about_blank_url( |
| 414 base::ASCIIToWide(content::kAboutBlankURL)); | 414 base::ASCIIToWide(url::kAboutBlankURL)); |
| 415 #else | 415 #else |
| 416 base::CommandLine::StringType about_blank_url(content::kAboutBlankURL); | 416 base::CommandLine::StringType about_blank_url(url::kAboutBlankURL); |
| 417 #endif | 417 #endif |
| 418 CommandLine::StringVector args = command_line.GetArgs(); | 418 CommandLine::StringVector args = command_line.GetArgs(); |
| 419 // Browser tests will add about:blank to the command line. This should | 419 // Browser tests will add about:blank to the command line. This should |
| 420 // never be interpreted as a file to open, as doing so with an app that | 420 // never be interpreted as a file to open, as doing so with an app that |
| 421 // has write access will result in a file 'about' being created, which | 421 // has write access will result in a file 'about' being created, which |
| 422 // causes problems on the bots. | 422 // causes problems on the bots. |
| 423 if (args.empty() || (command_line.HasSwitch(switches::kTestType) && | 423 if (args.empty() || (command_line.HasSwitch(switches::kTestType) && |
| 424 args[0] == about_blank_url)) { | 424 args[0] == about_blank_url)) { |
| 425 LaunchPlatformAppWithNoData(profile, extension); | 425 LaunchPlatformAppWithNoData(profile, extension); |
| 426 return; | 426 return; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 void LaunchPlatformAppWithUrl(Profile* profile, | 483 void LaunchPlatformAppWithUrl(Profile* profile, |
| 484 const Extension* extension, | 484 const Extension* extension, |
| 485 const std::string& handler_id, | 485 const std::string& handler_id, |
| 486 const GURL& url, | 486 const GURL& url, |
| 487 const GURL& referrer_url) { | 487 const GURL& referrer_url) { |
| 488 AppEventRouter::DispatchOnLaunchedEventWithUrl( | 488 AppEventRouter::DispatchOnLaunchedEventWithUrl( |
| 489 profile, extension, handler_id, url, referrer_url); | 489 profile, extension, handler_id, url, referrer_url); |
| 490 } | 490 } |
| 491 | 491 |
| 492 } // namespace apps | 492 } // namespace apps |
| OLD | NEW |