Chromium Code Reviews| Index: chrome/browser/ui/metro_pin_tab_helper.h |
| diff --git a/chrome/browser/ui/metro_pin_tab_helper.h b/chrome/browser/ui/metro_pin_tab_helper.h |
| index 23084a2fef920137992ba99e9dd549a6b759f215..365e6dcb4e869de88ee37b591dc4548b5a80324b 100644 |
| --- a/chrome/browser/ui/metro_pin_tab_helper.h |
| +++ b/chrome/browser/ui/metro_pin_tab_helper.h |
| @@ -5,14 +5,32 @@ |
| #ifndef CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_H_ |
| #define CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_H_ |
| +#include "base/memory/ref_counted.h" |
| #include "content/public/browser/web_contents_observer.h" |
| #include "content/public/browser/web_contents_user_data.h" |
| +#include "ui/gfx/image/image.h" |
| // Per-tab class to help manage metro pinning. |
| class MetroPinTabHelper |
| : public content::WebContentsObserver, |
| public content::WebContentsUserData<MetroPinTabHelper> { |
| public: |
| + // The TaskRunner handles running tasks for this helper on the FILE thread. |
|
sky
2012/10/22 21:18:00
Does this need to be public?
benwells
2012/10/23 10:34:25
No, made private.
|
| + class TaskRunner : public base::RefCountedThreadSafe<TaskRunner> { |
| + public: |
| + TaskRunner(); |
| + |
| + void PinPageToStartScreen(const string16& title, |
| + const string16& url, |
| + const gfx::Image& image); |
| + |
| + private: |
| + ~TaskRunner(); |
| + |
| + friend class base::RefCountedThreadSafe<TaskRunner>; |
| + DISALLOW_COPY_AND_ASSIGN(TaskRunner); |
| + }; |
| + |
| virtual ~MetroPinTabHelper(); |
| bool is_pinned() const { return is_pinned_; } |
| @@ -31,9 +49,15 @@ class MetroPinTabHelper |
| // Queries the metro driver about the pinned state of the current URL. |
| void UpdatePinnedStateForCurrentURL(); |
| + void UnPinPageFromStartScreen(); |
| + |
| // 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_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(MetroPinTabHelper); |
| }; |