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

Unified Diff: chrome/browser/win/jumplist_updater.h

Issue 2859193005: Cache JumpList icons to avoid unnecessary creation and deletion (Closed)
Patch Set: Fix nits. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/win/jumplist_file_util_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist_updater.h
diff --git a/chrome/browser/win/jumplist_updater.h b/chrome/browser/win/jumplist_updater.h
index 4cbd3a1d1ca04c9e07173c2efc3ba9d88cb77e1a..18a8e1a1552ad367039e45d2834599087a0445cd 100644
--- a/chrome/browser/win/jumplist_updater.h
+++ b/chrome/browser/win/jumplist_updater.h
@@ -28,6 +28,7 @@ class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> {
const base::string16& title() const { return title_; }
const base::string16& icon_path() const { return icon_path_; }
+ const std::string& url() const { return url_; }
int icon_index() const { return icon_index_; }
const gfx::ImageSkia& icon_image() const { return icon_image_; }
@@ -35,11 +36,11 @@ class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> {
base::CommandLine* GetCommandLine();
void set_title(const base::string16& title) { title_ = title; }
-
void set_icon(const base::string16& path, int index) {
icon_path_ = path;
icon_index_ = index;
}
+ void set_url(const std::string& url) { url_ = url; }
void set_icon_image(const gfx::ImageSkia& image) {
icon_image_ = image;
@@ -58,6 +59,9 @@ class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> {
// The absolute path to an icon to be displayed in a JumpList.
base::string16 icon_path_;
+ // The tab URL corresponding to this link's favicon.
+ std::string url_;
+
// The icon index in the icon file. If an icon file consists of two or more
// icons, set this value to identify the icon. If an icon file consists of
// one icon, this value is 0.
« no previous file with comments | « chrome/browser/win/jumplist_file_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698