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

Unified Diff: chrome/browser/views/toolbar_star_toggle.h

Issue 543215: Added Star button to compact navigation mode.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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/views/star_toggle.cc ('k') | chrome/browser/views/toolbar_star_toggle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/toolbar_star_toggle.h
===================================================================
--- chrome/browser/views/toolbar_star_toggle.h (revision 38044)
+++ chrome/browser/views/toolbar_star_toggle.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -9,18 +9,31 @@
#include "chrome/browser/views/info_bubble.h"
#include "views/controls/button/image_button.h"
+class BubblePositioner;
class GURL;
-class ToolbarView;
+class Profile;
+namespace views {
+class ButtonListener;
+class View;
+} // namespace views
+
// ToolbarStarToggle is used for the star button on the toolbar, allowing the
// user to star the current page. ToolbarStarToggle manages showing the
// InfoBubble and rendering the appropriate state while the bubble is visible.
-
class ToolbarStarToggle : public views::ToggleImageButton,
public InfoBubbleDelegate {
public:
- ToolbarStarToggle(views::ButtonListener* listener, ToolbarView* host);
+ explicit ToolbarStarToggle(views::ButtonListener* button_listener);
+ void set_profile(Profile* profile) { profile_ = profile; }
+ void set_host_view(views::View* host_view) { host_view_ = host_view; }
+ void set_bubble_positioner(BubblePositioner* bubble_positioner) {
+ bubble_positioner_ = bubble_positioner;
+ }
+
+ void Init();
+
// If the bubble isn't showing, shows it.
void ShowStarBubble(const GURL& url, bool newly_bookmarked);
@@ -45,9 +58,15 @@
bool closed_by_escape);
virtual bool CloseOnEscape();
- // Contains us.
- ToolbarView* host_;
+ // Profile with bookmarks info.
+ Profile* profile_;
+ // View that hosts us.
+ views::View* host_view_;
+
+// Positioner for bookmark bubble.
+ BubblePositioner* bubble_positioner_;
+
// Time the bubble last closed.
base::TimeTicks bubble_closed_time_;
@@ -55,7 +74,7 @@
// the amount of time between when the bubble clicked and now.
bool ignore_click_;
- DISALLOW_EVIL_CONSTRUCTORS(ToolbarStarToggle);
+ DISALLOW_COPY_AND_ASSIGN(ToolbarStarToggle);
};
#endif // CHROME_BROWSER_VIEWS_TOOLBAR_STAR_TOGGLE_H_
« no previous file with comments | « chrome/browser/views/star_toggle.cc ('k') | chrome/browser/views/toolbar_star_toggle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698