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

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

Issue 10801006: Allow secondary tiles to be unpinned. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove NULL check Created 8 years, 5 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/ui/browser_win.cc ('k') | chrome/browser/ui/metro_pin_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..c72e503236209ea9eb48a5f37c71b16d2b93737e
--- /dev/null
+++ b/chrome/browser/ui/metro_pin_tab_helper.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_H_
+#define CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_H_
+
+#include "content/public/browser/web_contents_observer.h"
+
+// Per-tab class to help manage metro pinning.
+class MetroPinTabHelper : public content::WebContentsObserver {
+ public:
+ explicit MetroPinTabHelper(content::WebContents* tab_contents);
+ virtual ~MetroPinTabHelper();
+
+ bool is_pinned() const { return is_pinned_; }
+
+ void TogglePinnedToStartScreen();
+
+ // content::WebContentsObserver overrides:
+ virtual void DidNavigateMainFrame(
+ const content::LoadCommittedDetails& details,
+ const content::FrameNavigateParams& params) OVERRIDE;
+
+ private:
+ // Queries the metro driver about the pinned state of the current URL.
+ void UpdatePinnedStateForCurrentURL();
+
+ // Whether the current URL is pinned to the metro start screen.
+ bool is_pinned_;
+
+ DISALLOW_COPY_AND_ASSIGN(MetroPinTabHelper);
+};
+
+#endif // CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_H_
« no previous file with comments | « chrome/browser/ui/browser_win.cc ('k') | chrome/browser/ui/metro_pin_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698