| 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_PROGRESS_EVENT_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_ |
| 6 #define COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_ | 6 #define COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/nacl/renderer/ppb_nacl_private.h" |
| 10 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
| 11 #include "ppapi/c/private/ppb_nacl_private.h" | |
| 12 | 12 |
| 13 namespace nacl { | 13 namespace nacl { |
| 14 | 14 |
| 15 // See http://www.w3.org/TR/progress-events/ for more details on progress | 15 // See http://www.w3.org/TR/progress-events/ for more details on progress |
| 16 // events. | 16 // events. |
| 17 struct ProgressEvent { | 17 struct ProgressEvent { |
| 18 explicit ProgressEvent(PP_NaClEventType event_type_param) | 18 explicit ProgressEvent(PP_NaClEventType event_type_param) |
| 19 : event_type(event_type_param), | 19 : event_type(event_type_param), |
| 20 length_is_computable(false), | 20 length_is_computable(false), |
| 21 loaded_bytes(0), | 21 loaded_bytes(0), |
| (...skipping 22 matching lines...) Expand all Loading... |
| 44 // Dispatches a progress event to the DOM frame corresponding to the specified | 44 // Dispatches a progress event to the DOM frame corresponding to the specified |
| 45 // plugin instance. | 45 // plugin instance. |
| 46 // This posts a task to the main thread to perform the actual dispatch, since | 46 // This posts a task to the main thread to perform the actual dispatch, since |
| 47 // it's usually intended for progress events to be dispatched after all other | 47 // it's usually intended for progress events to be dispatched after all other |
| 48 // state changes are handled. | 48 // state changes are handled. |
| 49 void DispatchProgressEvent(PP_Instance instance, const ProgressEvent& event); | 49 void DispatchProgressEvent(PP_Instance instance, const ProgressEvent& event); |
| 50 | 50 |
| 51 } // namespace nacl | 51 } // namespace nacl |
| 52 | 52 |
| 53 #endif // COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_ | 53 #endif // COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_ |
| OLD | NEW |