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

Unified Diff: chrome/browser/ui/views/location_bar/metro_pin_view.h

Issue 10800054: Add pin icon to the omnibar in windows 8 metro mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: linux tests 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
Index: chrome/browser/ui/views/location_bar/metro_pin_view.h
diff --git a/chrome/browser/ui/views/location_bar/metro_pin_view.h b/chrome/browser/ui/views/location_bar/metro_pin_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..d888de24e9f2ce582e18a7d8879d80121d56c0ad
--- /dev/null
+++ b/chrome/browser/ui/views/location_bar/metro_pin_view.h
@@ -0,0 +1,39 @@
+// 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_VIEWS_LOCATION_BAR_METRO_PIN_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_METRO_PIN_VIEW_H_
+
+#include "chrome/browser/ui/views/location_bar/touchable_location_bar_view.h"
+#include "ui/views/controls/button/image_button.h"
+
+class CommandUpdater;
+
+class MetroPinView
+ : public views::ImageButton,
+ public views::ButtonListener,
+ public TouchableLocationBarView {
+ public:
+ explicit MetroPinView(CommandUpdater* command_updater);
+ virtual ~MetroPinView();
+
+ // When the page is already pinned, clicking the pin view will cause the page
+ // to become unpinned.
+ void SetIsPinned(bool is_pinned);
+
+ // views::ButtonListener.
+ virtual void ButtonPressed(Button* sender,
+ const views::Event& event) OVERRIDE;
+
+ // TouchableLocationBarView.
+ virtual int GetBuiltInHorizontalPadding() const OVERRIDE;
+
+ private:
+ // The CommandUpdater for the Browser object that owns the location bar.
+ CommandUpdater* command_updater_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(MetroPinView);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_METRO_PIN_VIEW_H_
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/metro_pin_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698