| 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/platform_app_launcher.h" | 5 #include "chrome/browser/extensions/platform_app_launcher.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/extensions/extension_system.h" | 21 #include "chrome/browser/extensions/extension_system.h" |
| 22 #include "chrome/browser/extensions/lazy_background_task_queue.h" | 22 #include "chrome/browser/extensions/lazy_background_task_queue.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h" | 24 #include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h" |
| 25 #include "chrome/common/extensions/extension.h" | 25 #include "chrome/common/extensions/extension.h" |
| 26 #include "chrome/common/extensions/extension_messages.h" | 26 #include "chrome/common/extensions/extension_messages.h" |
| 27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 28 #include "content/public/browser/child_process_security_policy.h" | 28 #include "content/public/browser/child_process_security_policy.h" |
| 29 #include "content/public/browser/render_process_host.h" | 29 #include "content/public/browser/render_process_host.h" |
| 30 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 31 #include "googleurl/src/gurl.h" |
| 31 #include "net/base/mime_util.h" | 32 #include "net/base/mime_util.h" |
| 32 #include "net/base/net_util.h" | 33 #include "net/base/net_util.h" |
| 33 #include "webkit/fileapi/file_system_types.h" | 34 #include "webkit/fileapi/file_system_types.h" |
| 34 #include "webkit/fileapi/isolated_context.h" | 35 #include "webkit/fileapi/isolated_context.h" |
| 35 | 36 |
| 36 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
| 37 #include "chrome/browser/chromeos/drive/drive_file_error.h" | 38 #include "chrome/browser/chromeos/drive/drive_file_error.h" |
| 38 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h" | 39 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h" |
| 39 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" | 40 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" |
| 40 #include "chrome/browser/chromeos/drive/drive_system_service.h" | 41 #include "chrome/browser/chromeos/drive/drive_system_service.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 405 |
| 405 void LaunchPlatformAppWithFileHandler(Profile* profile, | 406 void LaunchPlatformAppWithFileHandler(Profile* profile, |
| 406 const Extension* extension, | 407 const Extension* extension, |
| 407 const std::string& handler_id, | 408 const std::string& handler_id, |
| 408 const base::FilePath& file_path) { | 409 const base::FilePath& file_path) { |
| 409 scoped_refptr<PlatformAppPathLauncher> launcher = | 410 scoped_refptr<PlatformAppPathLauncher> launcher = |
| 410 new PlatformAppPathLauncher(profile, extension, file_path); | 411 new PlatformAppPathLauncher(profile, extension, file_path); |
| 411 launcher->LaunchWithHandler(handler_id); | 412 launcher->LaunchWithHandler(handler_id); |
| 412 } | 413 } |
| 413 | 414 |
| 415 void LaunchPlatformAppWithURL(Profile* profile, |
| 416 const Extension* extension, |
| 417 const std::string& handler_id, |
| 418 const GURL& url, |
| 419 const GURL& referrerUrl) { |
| 420 AppEventRouter::DispatchOnLaunchedEventWithURL( |
| 421 profile, extension, handler_id, url, referrerUrl); |
| 422 } |
| 423 |
| 414 void RestartPlatformAppWithFileEntries( | 424 void RestartPlatformAppWithFileEntries( |
| 415 Profile* profile, | 425 Profile* profile, |
| 416 const Extension* extension, | 426 const Extension* extension, |
| 417 const std::vector<SavedFileEntry>& file_entries) { | 427 const std::vector<SavedFileEntry>& file_entries) { |
| 418 scoped_refptr<SavedFileEntryLauncher> launcher = new SavedFileEntryLauncher( | 428 scoped_refptr<SavedFileEntryLauncher> launcher = new SavedFileEntryLauncher( |
| 419 profile, extension, file_entries); | 429 profile, extension, file_entries); |
| 420 launcher->Launch(); | 430 launcher->Launch(); |
| 421 } | 431 } |
| 422 | 432 |
| 423 } // namespace extensions | 433 } // namespace extensions |
| OLD | NEW |