summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/favicon/favicon_client_impl.h
blob: 3874fb5dbb941d04edaf3c4848defa2288dbef8d (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
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2015 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 IOS_CHROME_BROWSER_FAVICON_FAVICON_CLIENT_IMPL_H_
#define IOS_CHROME_BROWSER_FAVICON_FAVICON_CLIENT_IMPL_H_

#include <vector>

#include "base/macros.h"
#include "base/task/cancelable_task_tracker.h"
#include "components/favicon/core/favicon_client.h"
#include "components/favicon_base/favicon_callback.h"

namespace ios {
class ChromeBrowserState;
}

class GURL;

// FaviconClientImpl implements the favicon::FaviconClient interface on iOS.
class FaviconClientImpl : public favicon::FaviconClient {
 public:
  FaviconClientImpl(ios::ChromeBrowserState* browser_state);
  ~FaviconClientImpl() override;

 private:
  // favicon::FaviconClient implementation.
  bool IsNativeApplicationURL(const GURL& url) override;
  base::CancelableTaskTracker::TaskId GetFaviconForNativeApplicationURL(
      const GURL& url,
      const std::vector<int>& desired_sizes_in_pixel,
      const favicon_base::FaviconResultsCallback& callback,
      base::CancelableTaskTracker* tracker) override;

  ios::ChromeBrowserState* browser_state_;

  DISALLOW_COPY_AND_ASSIGN(FaviconClientImpl);
};

#endif  // IOS_CHROME_BROWSER_FAVICON_FAVICON_CLIENT_IMPL_H_