| 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 #ifndef CHROME_BROWSER_IMAGE_DECODER_H_ | 5 #ifndef CHROME_BROWSER_IMAGE_DECODER_H_ |
| 6 #define CHROME_BROWSER_IMAGE_DECODER_H_ | 6 #define CHROME_BROWSER_IMAGE_DECODER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // Map of request id's to ImageRequests. | 135 // Map of request id's to ImageRequests. |
| 136 RequestMap image_request_id_map_; | 136 RequestMap image_request_id_map_; |
| 137 | 137 |
| 138 // Protects |image_request_id_map_| and |image_request_id_counter_|. | 138 // Protects |image_request_id_map_| and |image_request_id_counter_|. |
| 139 base::Lock map_lock_; | 139 base::Lock map_lock_; |
| 140 | 140 |
| 141 // The UtilityProcessHost requests are sent to. | 141 // The UtilityProcessHost requests are sent to. |
| 142 base::WeakPtr<content::UtilityProcessHost> utility_process_host_; | 142 base::WeakPtr<content::UtilityProcessHost> utility_process_host_; |
| 143 | 143 |
| 144 // Calls StopBatchMode() after |kBatchModeTimeoutSeconds| have elapsed. | 144 // Calls StopBatchMode() after |kBatchModeTimeoutSeconds| have elapsed, |
| 145 base::RepeatingTimer<ImageDecoder> batch_mode_timer_; | 145 // unless a new decoding request resets the timer. |
| 146 | 146 scoped_ptr<base::DelayTimer<ImageDecoder>> batch_mode_timer_; |
| 147 // The time Start() was last called. | |
| 148 base::TimeTicks last_request_; | |
| 149 | 147 |
| 150 DISALLOW_COPY_AND_ASSIGN(ImageDecoder); | 148 DISALLOW_COPY_AND_ASSIGN(ImageDecoder); |
| 151 }; | 149 }; |
| 152 | 150 |
| 153 #endif // CHROME_BROWSER_IMAGE_DECODER_H_ | 151 #endif // CHROME_BROWSER_IMAGE_DECODER_H_ |
| OLD | NEW |