| 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 CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_IMAGE_LOADER_H_ | 5 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_IMAGE_LOADER_H_ |
| 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_IMAGE_LOADER_H_ | 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_IMAGE_LOADER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/sequenced_task_runner_helpers.h" | 16 #include "base/sequenced_task_runner_helpers.h" |
| 17 #include "base/time/time.h" |
| 17 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 18 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
| 18 | 19 |
| 19 class GURL; | 20 class GURL; |
| 20 class SkBitmap; | 21 class SkBitmap; |
| 21 | 22 |
| 22 namespace base { | 23 namespace base { |
| 23 class SingleThreadTaskRunner; | 24 class SingleThreadTaskRunner; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace blink { | 27 namespace blink { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 93 |
| 93 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; | 94 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; |
| 94 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 95 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 95 | 96 |
| 96 bool completed_; | 97 bool completed_; |
| 97 | 98 |
| 98 scoped_ptr<blink::WebURLLoader> url_loader_; | 99 scoped_ptr<blink::WebURLLoader> url_loader_; |
| 99 | 100 |
| 100 std::vector<uint8_t> buffer_; | 101 std::vector<uint8_t> buffer_; |
| 101 | 102 |
| 103 base::TimeTicks start_time_; |
| 104 |
| 102 DISALLOW_COPY_AND_ASSIGN(NotificationImageLoader); | 105 DISALLOW_COPY_AND_ASSIGN(NotificationImageLoader); |
| 103 }; | 106 }; |
| 104 | 107 |
| 105 struct NotificationImageLoaderDeleter { | 108 struct NotificationImageLoaderDeleter { |
| 106 static void Destruct(const NotificationImageLoader* context) { | 109 static void Destruct(const NotificationImageLoader* context) { |
| 107 context->DeleteOnCorrectThread(); | 110 context->DeleteOnCorrectThread(); |
| 108 } | 111 } |
| 109 }; | 112 }; |
| 110 | 113 |
| 111 } // namespace content | 114 } // namespace content |
| 112 | 115 |
| 113 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_IMAGE_LOADER_H_ | 116 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_IMAGE_LOADER_H_ |
| OLD | NEW |