| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" | 9 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" |
| 10 | 10 |
| 11 class Browser; | 11 class Browser; |
| 12 class CommandUpdater; | 12 class CommandUpdater; |
| 13 | 13 |
| 14 // The star icon to show a bookmark bubble. | 14 // The star icon to show a bookmark bubble. |
| 15 class StarView : public BubbleIconView { | 15 class StarView : public BubbleIconView { |
| 16 public: | 16 public: |
| 17 StarView(CommandUpdater* command_updater, Browser* browser); | 17 StarView(CommandUpdater* command_updater, Browser* browser); |
| 18 ~StarView() override; | 18 ~StarView() override; |
| 19 | 19 |
| 20 // Toggles the star on or off. | 20 // Toggles the star on or off. |
| 21 void SetToggled(bool on); | 21 void SetToggled(bool on); |
| 22 | 22 |
| 23 protected: | 23 protected: |
| 24 // BubbleIconView: | 24 // BubbleIconView: |
| 25 void OnExecuting(BubbleIconView::ExecuteSource execute_source) override; | 25 void OnExecuting(BubbleIconView::ExecuteSource execute_source) override; |
| 26 void ExecuteCommand(ExecuteSource source) override; | 26 void ExecuteCommand(ExecuteSource source) override; |
| 27 views::BubbleDelegateView* GetBubble() const override; | 27 views::BubbleDialogDelegateView* GetBubble() const override; |
| 28 bool SetRasterIcon() override; | 28 bool SetRasterIcon() override; |
| 29 gfx::VectorIconId GetVectorIcon() const override; | 29 gfx::VectorIconId GetVectorIcon() const override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 Browser* browser_; | 32 Browser* browser_; |
| 33 | 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(StarView); | 34 DISALLOW_COPY_AND_ASSIGN(StarView); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_ | 37 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_ |
| OLD | NEW |