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

Side by Side Diff: components/favicon/core/browser/favicon_client.h

Issue 1021223002: Remove //components/favicon/core/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/favicon/core/browser/DEPS ('k') | components/favicon/core/browser/favicon_handler.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_FAVICON_CORE_BROWSER_FAVICON_CLIENT_H_
6 #define COMPONENTS_FAVICON_CORE_BROWSER_FAVICON_CLIENT_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "base/task/cancelable_task_tracker.h"
12 #include "components/favicon_base/favicon_callback.h"
13 #include "components/keyed_service/core/keyed_service.h"
14
15 class GURL;
16
17 // This class abstracts operations that depend on the embedder's environment,
18 // e.g. Chrome.
19 class FaviconClient : public KeyedService {
20 public:
21 // Returns true if the specified URL is bookmarked.
22 virtual bool IsBookmarked(const GURL& url) = 0;
23
24 // Returns true if the specified URL is a native application page URL.
25 // If this returns true the favicon for the page must be fetched using
26 // GetFaviconForNativeApplicationURL().
27 virtual bool IsNativeApplicationURL(const GURL& url) = 0;
28
29 // Requests the favicon for a native application page URL for the sizes
30 // specified by |desired_sizes_in_pixel|. Returns a TaskId to use to cancel
31 // the request using |tracker| or kBadTaskId if the request cannot be
32 // scheduled. |callback| will be called with the favicon results.
33 virtual base::CancelableTaskTracker::TaskId GetFaviconForNativeApplicationURL(
34 const GURL& url,
35 const std::vector<int>& desired_sizes_in_pixel,
36 const favicon_base::FaviconResultsCallback& callback,
37 base::CancelableTaskTracker* tracker) = 0;
38
39 protected:
40 FaviconClient() {}
41 ~FaviconClient() override {}
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(FaviconClient);
45 };
46
47 #endif // COMPONENTS_FAVICON_CORE_BROWSER_FAVICON_CLIENT_H_
OLDNEW
« no previous file with comments | « components/favicon/core/browser/DEPS ('k') | components/favicon/core/browser/favicon_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698