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 COMPONENTS_NACL_RENDERER_NEXE_LOAD_MANAGER_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_NEXE_LOAD_MANAGER_H_ |
6 #define COMPONENTS_NACL_RENDERER_NEXE_LOAD_MANAGER_H_ | 6 #define COMPONENTS_NACL_RENDERER_NEXE_LOAD_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 int32_t fd, | 34 int32_t fd, |
35 int32_t http_status, | 35 int32_t http_status, |
36 int64_t nexe_bytes_read, | 36 int64_t nexe_bytes_read, |
37 const std::string& url, | 37 const std::string& url, |
38 int64_t time_since_open); | 38 int64_t time_since_open); |
39 void ReportLoadSuccess(const std::string& url, | 39 void ReportLoadSuccess(const std::string& url, |
40 uint64_t loaded_bytes, | 40 uint64_t loaded_bytes, |
41 uint64_t total_bytes); | 41 uint64_t total_bytes); |
42 void ReportLoadError(PP_NaClError error, | 42 void ReportLoadError(PP_NaClError error, |
43 const std::string& error_message); | 43 const std::string& error_message); |
| 44 |
| 45 // console_message is a part of the error that is logged to |
| 46 // the JavaScript console but is not reported to JavaScript via |
| 47 // the lastError property. This is used to report internal errors which |
| 48 // may easily change in new versions of the browser and we don't want apps |
| 49 // to come to depend on the details of these errors. |
44 void ReportLoadError(PP_NaClError error, | 50 void ReportLoadError(PP_NaClError error, |
45 const std::string& error_message, | 51 const std::string& error_message, |
46 const std::string& console_message); | 52 const std::string& console_message); |
47 void ReportLoadAbort(); | 53 void ReportLoadAbort(); |
48 void NexeDidCrash(const char* crash_log); | 54 void NexeDidCrash(const char* crash_log); |
49 | 55 |
50 // TODO(dmichael): Everything below this comment should eventually be made | 56 // TODO(dmichael): Everything below this comment should eventually be made |
51 // private, when ppb_nacl_private_impl.cc is no longer using them directly. | 57 // private, when ppb_nacl_private_impl.cc is no longer using them directly. |
52 // The intent is for this class to only expose functions for reporting a | 58 // The intent is for this class to only expose functions for reporting a |
53 // load state transition (e.g., ReportLoadError, ReportProgress, | 59 // load state transition (e.g., ReportLoadError, ReportProgress, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 std::string mime_type_; | 158 std::string mime_type_; |
153 | 159 |
154 scoped_ptr<TrustedPluginChannel> trusted_plugin_channel_; | 160 scoped_ptr<TrustedPluginChannel> trusted_plugin_channel_; |
155 scoped_ptr<ManifestServiceChannel> manifest_service_channel_; | 161 scoped_ptr<ManifestServiceChannel> manifest_service_channel_; |
156 base::WeakPtrFactory<NexeLoadManager> weak_factory_; | 162 base::WeakPtrFactory<NexeLoadManager> weak_factory_; |
157 }; | 163 }; |
158 | 164 |
159 } // namespace nacl | 165 } // namespace nacl |
160 | 166 |
161 #endif // COMPONENTS_NACL_RENDERER_NEXE_LOAD_MANAGER_H_ | 167 #endif // COMPONENTS_NACL_RENDERER_NEXE_LOAD_MANAGER_H_ |
OLD | NEW |