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

Unified Diff: chrome/browser/ui/metro_pin_tab_helper_win.h

Issue 11306005: Download large icon if available when creating secondary tiles on Windows 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: chrome/browser/ui/metro_pin_tab_helper_win.h
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.h b/chrome/browser/ui/metro_pin_tab_helper_win.h
index 3cb2532d508e522f64aeee602d4f474b90dfb5ba..cb50aaeeae44dab10743a4243eb496b724b63976 100644
--- a/chrome/browser/ui/metro_pin_tab_helper_win.h
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.h
@@ -5,8 +5,12 @@
#ifndef CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_
#define CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_
+#include <vector>
+
+#include "chrome/common/favicon_url.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image_skia.h"
// Per-tab class to help manage metro pinning.
@@ -25,13 +29,25 @@ class MetroPinTabHelper
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
private:
- // The TaskRunner handles running tasks for this helper on the FILE thread.
- class TaskRunner;
+ // The PagePinner handles running tasks required to pin pages, such as
+ // downloading favicons and generating tile icons.
+ class PagePinner;
explicit MetroPinTabHelper(content::WebContents* tab_contents);
friend class content::WebContentsUserData<MetroPinTabHelper>;
+ // Message Handlers.
+ void OnUpdateFaviconURL(int32 page_id,
+ const std::vector<FaviconURL>& candidates);
+ void OnDidDownloadFavicon(int id,
+ const GURL& image_url,
+ bool errored,
+ int requested_size,
+ const std::vector<SkBitmap>& bitmaps);
+
// Queries the metro driver about the pinned state of the current URL.
void UpdatePinnedStateForCurrentURL();
@@ -40,9 +56,8 @@ class MetroPinTabHelper
// Whether the current URL is pinned to the metro start screen.
bool is_pinned_;
- // The task runner for the helper, which runs things for it on the FILE
- // thread.
- scoped_refptr<TaskRunner> task_runner_;
+ // The page pinner for the helper.
+ scoped_refptr<PagePinner> page_pinner_;
DISALLOW_COPY_AND_ASSIGN(MetroPinTabHelper);
};
« no previous file with comments | « no previous file | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698