| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (!in_kiosk_mode) { | 326 if (!in_kiosk_mode) { |
| 327 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " | 327 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " |
| 328 << " ChromeOS kiosk mode."; | 328 << " ChromeOS kiosk mode."; |
| 329 NOTREACHED(); | 329 NOTREACHED(); |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 #if defined(OS_WIN) | 334 #if defined(OS_WIN) |
| 335 base::CommandLine::StringType about_blank_url( | 335 base::CommandLine::StringType about_blank_url( |
| 336 base::ASCIIToWide(content::kAboutBlankURL)); | 336 base::ASCIIToWide(url::kAboutBlankURL)); |
| 337 #else | 337 #else |
| 338 base::CommandLine::StringType about_blank_url(content::kAboutBlankURL); | 338 base::CommandLine::StringType about_blank_url(url::kAboutBlankURL); |
| 339 #endif | 339 #endif |
| 340 CommandLine::StringVector args = command_line.GetArgs(); | 340 CommandLine::StringVector args = command_line.GetArgs(); |
| 341 // Browser tests will add about:blank to the command line. This should | 341 // Browser tests will add about:blank to the command line. This should |
| 342 // never be interpreted as a file to open, as doing so with an app that | 342 // never be interpreted as a file to open, as doing so with an app that |
| 343 // has write access will result in a file 'about' being created, which | 343 // has write access will result in a file 'about' being created, which |
| 344 // causes problems on the bots. | 344 // causes problems on the bots. |
| 345 if (args.empty() || (command_line.HasSwitch(switches::kTestType) && | 345 if (args.empty() || (command_line.HasSwitch(switches::kTestType) && |
| 346 args[0] == about_blank_url)) { | 346 args[0] == about_blank_url)) { |
| 347 LaunchPlatformAppWithNoData(profile, extension); | 347 LaunchPlatformAppWithNoData(profile, extension); |
| 348 return; | 348 return; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 void LaunchPlatformAppWithUrl(Profile* profile, | 404 void LaunchPlatformAppWithUrl(Profile* profile, |
| 405 const Extension* extension, | 405 const Extension* extension, |
| 406 const std::string& handler_id, | 406 const std::string& handler_id, |
| 407 const GURL& url, | 407 const GURL& url, |
| 408 const GURL& referrer_url) { | 408 const GURL& referrer_url) { |
| 409 AppEventRouter::DispatchOnLaunchedEventWithUrl( | 409 AppEventRouter::DispatchOnLaunchedEventWithUrl( |
| 410 profile, extension, handler_id, url, referrer_url); | 410 profile, extension, handler_id, url, referrer_url); |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace apps | 413 } // namespace apps |
| OLD | NEW |