Chromium Code Reviews| 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_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ | 5 #ifndef COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_DELEGATE_H_ |
| 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ | 6 #define COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Image; | 13 class Image; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace image_fetcher { | 16 namespace image_fetcher { |
| 17 | 17 |
| 18 class ImageFetcherDelegate { | 18 class ImageFetcherDelegate { |
| 19 public: | 19 public: |
| 20 ImageFetcherDelegate() {} | 20 ImageFetcherDelegate() {} |
| 21 | 21 |
| 22 // Called when the data for an image was fetched. |id| is an identifier for | 22 // Called when the data for an image was fetched. |id| is an identifier for |
| 23 // the fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |data| | 23 // the fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |data| |
| 24 // stores (generally compressed) image data owned by the caller, and can be | 24 // stores (generally compressed) image data owned by the caller, and can be |
| 25 // empty if the fetch failed. | 25 // empty if the fetch failed. |
| 26 virtual void OnImageDataFetched(const std::string& id, | 26 virtual void OnImageDataFetched(const std::string& id, |
| 27 const std::string& data) {}; | 27 const std::string& data){}; |
|
Marc Treib
2017/03/21 14:40:04
I assume this is git cl formatted? Weird...
mastiz
2017/03/21 14:47:57
Removed final semicolon which seems to cause this
| |
| 28 | 28 |
| 29 // Called when an image was fetched and decoded. |id| is an identifier for the | 29 // Called when an image was fetched and decoded. |id| is an identifier for the |
| 30 // fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |image| | 30 // fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |image| |
| 31 // stores image data owned by the caller, and can be an empty gfx::Image. | 31 // stores image data owned by the caller, and can be an empty gfx::Image. |
| 32 virtual void OnImageFetched(const std::string& id, | 32 virtual void OnImageFetched(const std::string& id, const gfx::Image& image){}; |
| 33 const gfx::Image& image) {}; | |
| 34 | 33 |
| 35 protected: | 34 protected: |
| 36 virtual ~ImageFetcherDelegate() {} | 35 virtual ~ImageFetcherDelegate() {} |
| 37 | 36 |
| 38 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate); |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 } // namespace image_fetcher | 40 } // namespace image_fetcher |
| 42 | 41 |
| 43 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ | 42 #endif // COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_DELEGATE_H_ |
| OLD | NEW |