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

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

Issue 10792020: Implements the "Set to default" button on the zoom bubble. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added private helper functions to make code more readable 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/zoom_view.h
diff --git a/chrome/browser/ui/views/location_bar/zoom_view.h b/chrome/browser/ui/views/location_bar/zoom_view.h
index 2c5062244cbd9339566db1ab8ee383c37ff314e3..c6b275b392d6a9fca0e0d338eed2f6b33b8b601b 100644
--- a/chrome/browser/ui/views/location_bar/zoom_view.h
+++ b/chrome/browser/ui/views/location_bar/zoom_view.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
+#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "ui/views/controls/image_view.h"
@@ -18,7 +19,12 @@ class MouseEvent;
// View for the zoom icon in the Omnibox.
class ZoomView : public views::ImageView {
public:
- explicit ZoomView(ToolbarModel* toolbar_model);
+ // Constructor for ZoomView. Clicking on the ZoomView shows a ZoomBubbleView,
+ // which requires the current TabContents. Thus, a LocationBarView::Delegate
Peter Kasting 2012/07/26 01:36:14 Nit: Maybe clearer: "...current TabContents, which
Kyle Horimoto 2012/08/03 03:33:29 Done.
+ // is passed here so that it can be queried for the current TabContents as
+ // needed.
+ explicit ZoomView(ToolbarModel* toolbar_model,
Peter Kasting 2012/07/26 01:36:14 Nit: explicit not needed for 2-arg constructor
Kyle Horimoto 2012/08/03 03:33:29 Done.
+ LocationBarView::Delegate* location_bar_delegate);
virtual ~ZoomView();
void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state);
@@ -40,6 +46,9 @@ class ZoomView : public views::ImageView {
// Toolbar model used to test whether location bar input is in progress.
ToolbarModel* toolbar_model_;
+ // The Delegate for this view's corresponding LocationBarView.
Peter Kasting 2012/07/26 01:36:14 Nit: Maybe "The delegate we can use to get the cur
Kyle Horimoto 2012/08/03 03:33:29 Done.
+ LocationBarView::Delegate* location_bar_delegate_;
+
// The current icon state.
ZoomController::ZoomIconState zoom_icon_state_;

Powered by Google App Engine
This is Rietveld 408576698