Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: components/image_fetcher/image_fetcher_delegate.h

Issue 2761303002: Move common ImageFetcher component files to core/ (Closed)
Patch Set: Rebased. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/image_fetcher/image_fetcher.h ('k') | components/image_fetcher/image_fetcher_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace gfx {
13 class Image;
14 }
15
16 namespace image_fetcher {
17
18 class ImageFetcherDelegate {
19 public:
20 ImageFetcherDelegate() {}
21
22 // Called when the data for an image was fetched. |id| is an identifier for
23 // the fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |data|
24 // stores (generally compressed) image data owned by the caller, and can be
25 // empty if the fetch failed.
26 virtual void OnImageDataFetched(const std::string& id,
27 const std::string& data) {};
28
29 // Called when an image was fetched and decoded. |id| is an identifier for the
30 // fetch (as passed to ImageFetcher::StartOrQueueNetworkRequest); |image|
31 // stores image data owned by the caller, and can be an empty gfx::Image.
32 virtual void OnImageFetched(const std::string& id,
33 const gfx::Image& image) {};
34
35 protected:
36 virtual ~ImageFetcherDelegate() {}
37
38 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate);
39 };
40
41 } // namespace image_fetcher
42
43 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/image_fetcher/image_fetcher.h ('k') | components/image_fetcher/image_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698