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

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

Issue 25373009: Translate: New Bubble UX (for the view toolkit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix: view id on tests Created 7 years, 2 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/star_view.h
diff --git a/chrome/browser/ui/views/location_bar/star_view.h b/chrome/browser/ui/views/location_bar/star_view.h
index a2c7b95edbe9e4f4325f7c058237a83dd6e5d716..3aa91ec28e9cdb6460b6a6dcae9b3cc500aeb4ec 100644
--- a/chrome/browser/ui/views/location_bar/star_view.h
+++ b/chrome/browser/ui/views/location_bar/star_view.h
@@ -5,11 +5,12 @@
#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_STAR_VIEW_H_
-#include "ui/views/controls/image_view.h"
+#include "chrome/browser/ui/views/location_bar/bubble_icon_view.h"
class CommandUpdater;
-class StarView : public views::ImageView {
+// The star icon to show a bookmark bubble.
+class StarView : public BubbleIconView {
public:
explicit StarView(CommandUpdater* command_updater);
virtual ~StarView();
@@ -17,26 +18,13 @@ class StarView : public views::ImageView {
// Toggles the star on or off.
void SetToggled(bool on);
- private:
- // views::ImageView:
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual bool GetTooltipText(const gfx::Point& p,
- string16* tooltip) const OVERRIDE;
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
-
- // ui::EventHandler:
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
-
- // The CommandUpdater for the Browser object that owns the location bar.
- CommandUpdater* command_updater_;
-
- // This is used to check if the bookmark bubble was showing during the mouse
- // pressed event. If this is true then the mouse released event is ignored to
- // prevent the bubble from reshowing.
- bool suppress_mouse_released_action_;
+ protected:
+ // BubbleIconView:
+ virtual bool IsBubbleShowing() const OVERRIDE;
+ virtual void OnExecuting(
+ BubbleIconView::ExecuteSource execute_source) OVERRIDE;
+ private:
DISALLOW_COPY_AND_ASSIGN(StarView);
};
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/star_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698