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

Side by Side Diff: components/favicon/core/favicon_driver.h

Issue 2732653002: Add favicon integration tests for FaviconDriverImpl (Closed)
Patch Set: Added verification of color 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/favicon/core/BUILD.gn ('k') | components/favicon/core/favicon_driver_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
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_FAVICON_CORE_FAVICON_DRIVER_H_ 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_
6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ 6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // Initiates loading the favicon for the specified url. 31 // Initiates loading the favicon for the specified url.
32 virtual void FetchFavicon(const GURL& url) = 0; 32 virtual void FetchFavicon(const GURL& url) = 0;
33 33
34 // Returns the favicon for this tab, or IDR_DEFAULT_FAVICON if the tab does 34 // Returns the favicon for this tab, or IDR_DEFAULT_FAVICON if the tab does
35 // not have a favicon. The default implementation uses the current navigation 35 // not have a favicon. The default implementation uses the current navigation
36 // entry. Returns an empty bitmap if there are no navigation entries, which 36 // entry. Returns an empty bitmap if there are no navigation entries, which
37 // should rarely happen. 37 // should rarely happen.
38 virtual gfx::Image GetFavicon() const = 0; 38 virtual gfx::Image GetFavicon() const = 0;
39 39
40 // Returns true if we have the favicon for the page.
41 virtual bool FaviconIsValid() const = 0;
42
43 // Returns the URL of the current page, if any. Returns an invalid URL
44 // otherwise.
45 virtual GURL GetActiveURL() = 0;
46
47 protected: 40 protected:
48 FaviconDriver(); 41 FaviconDriver();
49 virtual ~FaviconDriver(); 42 virtual ~FaviconDriver();
50 43
51 // Notifies FaviconDriverObservers that the favicon image has been updated. 44 // Notifies FaviconDriverObservers that the favicon image has been updated.
52 void NotifyFaviconUpdatedObservers( 45 void NotifyFaviconUpdatedObservers(
53 FaviconDriverObserver::NotificationIconType notification_icon_type, 46 FaviconDriverObserver::NotificationIconType notification_icon_type,
54 const GURL& icon_url, 47 const GURL& icon_url,
55 bool icon_url_changed, 48 bool icon_url_changed,
56 const gfx::Image& image); 49 const gfx::Image& image);
57 50
58 private: 51 private:
59 base::ObserverList<FaviconDriverObserver> observer_list_; 52 base::ObserverList<FaviconDriverObserver> observer_list_;
60 53
61 DISALLOW_COPY_AND_ASSIGN(FaviconDriver); 54 DISALLOW_COPY_AND_ASSIGN(FaviconDriver);
62 }; 55 };
63 56
64 } // namespace favicon 57 } // namespace favicon
65 58
66 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ 59 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_
OLDNEW
« no previous file with comments | « components/favicon/core/BUILD.gn ('k') | components/favicon/core/favicon_driver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698