OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_METRO_PIN_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_METRO_PIN_VIEW_H_ |
| 7 |
| 8 #include "chrome/browser/ui/views/location_bar/touchable_location_bar_view.h" |
| 9 #include "ui/views/controls/button/image_button.h" |
| 10 |
| 11 class CommandUpdater; |
| 12 |
| 13 class MetroPinView |
| 14 : public views::ImageButton, |
| 15 public views::ButtonListener, |
| 16 public TouchableLocationBarView { |
| 17 public: |
| 18 explicit MetroPinView(CommandUpdater* command_updater); |
| 19 virtual ~MetroPinView(); |
| 20 |
| 21 // When the page is already pinned, clicking the pin view will cause the page |
| 22 // to become unpinned. |
| 23 void SetIsPinned(bool is_pinned); |
| 24 |
| 25 // views::ButtonListener. |
| 26 virtual void ButtonPressed(Button* sender, |
| 27 const views::Event& event) OVERRIDE; |
| 28 |
| 29 // TouchableLocationBarView. |
| 30 virtual int GetBuiltInHorizontalPadding() const OVERRIDE; |
| 31 |
| 32 private: |
| 33 // The CommandUpdater for the Browser object that owns the location bar. |
| 34 CommandUpdater* command_updater_; |
| 35 |
| 36 DISALLOW_IMPLICIT_CONSTRUCTORS(MetroPinView); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_METRO_PIN_VIEW_H_ |
OLD | NEW |