| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // An extremely simple implementation of DataSource that downloads the entire | 5 // An extremely simple implementation of DataSource that downloads the entire |
| 6 // media resource into memory before signaling that initialization has finished. | 6 // media resource into memory before signaling that initialization has finished. |
| 7 // Primarily used to test <audio> and <video> with buffering/caching removed | 7 // Primarily used to test <audio> and <video> with buffering/caching removed |
| 8 // from the equation. | 8 // from the equation. |
| 9 | 9 |
| 10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Simple state tracking variable. | 113 // Simple state tracking variable. |
| 114 enum State { | 114 enum State { |
| 115 UNINITIALIZED, | 115 UNINITIALIZED, |
| 116 INITIALIZING, | 116 INITIALIZING, |
| 117 INITIALIZED, | 117 INITIALIZED, |
| 118 STOPPED, | 118 STOPPED, |
| 119 }; | 119 }; |
| 120 State state_; | 120 State state_; |
| 121 | 121 |
| 122 // Used for accessing |state_|. | 122 // Used for accessing |state_|. |
| 123 Lock lock_; | 123 base::Lock lock_; |
| 124 | 124 |
| 125 // Filter callbacks. | 125 // Filter callbacks. |
| 126 scoped_ptr<media::FilterCallback> initialize_callback_; | 126 scoped_ptr<media::FilterCallback> initialize_callback_; |
| 127 | 127 |
| 128 // Used to ensure mocks for unittests are used instead of reset in Start(). | 128 // Used to ensure mocks for unittests are used instead of reset in Start(). |
| 129 bool keep_test_loader_; | 129 bool keep_test_loader_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); | 131 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace webkit_glue | 134 } // namespace webkit_glue |
| 135 | 135 |
| 136 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 136 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
| OLD | NEW |