summaryrefslogtreecommitdiffstats
path: root/components/suggestions/image_fetcher_delegate.h
blob: 69fbb869bbeccdd5735d4726436cfd2a1f595aba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_SUGGESTIONS_IMAGE_FETCHER_DELEGATE_H_
#define COMPONENTS_SUGGESTIONS_IMAGE_FETCHER_DELEGATE_H_

class GURL;
class SkBitmap;

namespace suggestions {

class ImageFetcherDelegate {
 public:
  ImageFetcherDelegate() {}

  // Called when an image was fetched. |url| represents the website for which
  // the image was fetched. |bitmap| stores image data owned by the caller, and
  // can be nullptr.
  virtual void OnImageFetched(const GURL& url, const SkBitmap* bitmap) = 0;

 protected:
  virtual ~ImageFetcherDelegate() {}

  DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate);
};

}  // namespace suggestions

#endif  // COMPONENTS_SUGGESTIONS_IMAGE_FETCHER_DELEGATE_H_