| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef APPS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 5 #ifndef APPS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
| 6 #define APPS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 6 #define APPS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
| 9 | 10 |
| 10 class GURL; | 11 class GURL; |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 class BrowserContext; | 14 class BrowserContext; |
| 14 class WebContents; | 15 class WebContents; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace extensions { | 18 namespace extensions { |
| 18 class Extension; | 19 class Extension; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 40 // the form: | 41 // the form: |
| 41 // { | 42 // { |
| 42 // "intent" : { | 43 // "intent" : { |
| 43 // "type" : "chrome-extension://fileentry", | 44 // "type" : "chrome-extension://fileentry", |
| 44 // "data" : a FileEntry, | 45 // "data" : a FileEntry, |
| 45 // "postResults" : a null function, | 46 // "postResults" : a null function, |
| 46 // "postFailure" : a null function | 47 // "postFailure" : a null function |
| 47 // } | 48 // } |
| 48 // } | 49 // } |
| 49 | 50 |
| 50 // The FileEntry is created from |file_system_id| and |base_name|. | 51 // The FileEntries are created from |file_system_id| and |base_name|. |
| 51 // |handler_id| corresponds to the id of the file_handlers item in the | 52 // |handler_id| corresponds to the id of the file_handlers item in the |
| 52 // manifest that resulted in a match which triggered this launch. | 53 // manifest that resulted in a match which triggered this launch. |
| 53 static void DispatchOnLaunchedEventWithFileEntry( | 54 static void DispatchOnLaunchedEventWithFileEntries( |
| 54 content::BrowserContext* context, | 55 content::BrowserContext* context, |
| 55 const extensions::Extension* extension, | 56 const extensions::Extension* extension, |
| 56 const std::string& handler_id, | 57 const std::string& handler_id, |
| 57 const std::string& mime_type, | 58 const std::vector<std::string>& mime_types, |
| 58 const file_handler_util::GrantedFileEntry& file_entry); | 59 const std::vector<file_handler_util::GrantedFileEntry>& file_entries); |
| 59 | 60 |
| 60 // |handler_id| corresponds to the id of the url_handlers item | 61 // |handler_id| corresponds to the id of the url_handlers item |
| 61 // in the manifest that resulted in a match which triggered this launch. | 62 // in the manifest that resulted in a match which triggered this launch. |
| 62 static void DispatchOnLaunchedEventWithUrl( | 63 static void DispatchOnLaunchedEventWithUrl( |
| 63 content::BrowserContext* context, | 64 content::BrowserContext* context, |
| 64 const extensions::Extension* extension, | 65 const extensions::Extension* extension, |
| 65 const std::string& handler_id, | 66 const std::string& handler_id, |
| 66 const GURL& url, | 67 const GURL& url, |
| 67 const GURL& referrer_url); | 68 const GURL& referrer_url); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace apps | 71 } // namespace apps |
| 71 | 72 |
| 72 #endif // APPS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 73 #endif // APPS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
| OLD | NEW |