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

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

Issue 10494004: Implements a zoom icon in the Omnibox for Views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase & nit Created 8 years, 6 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/location_bar_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index b4cd8cc198b79c38f3a4affa9e16b5b0eb3fccd1..39d7180ad288e99f11fb5f7dde2b937bb5ad3dc3 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -20,6 +20,7 @@
#include "chrome/browser/ui/views/dropdown_bar_host.h"
#include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
#include "chrome/browser/ui/views/extensions/extension_popup.h"
+#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/font.h"
@@ -50,6 +51,7 @@ class StarView;
class SuggestedTextView;
class TabContents;
class TemplateURLService;
+class ZoomView;
namespace chrome {
namespace search {
@@ -182,12 +184,21 @@ class LocationBarView : public LocationBar,
// Returns the delegate.
Delegate* delegate() const { return delegate_; }
+ // Sets the tooltip for the zoom icon.
+ void SetZoomIconTooltipPercent(int zoom_percent);
+
+ // Sets the zoom icon state.
+ void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state);
+
+ // Shows the zoom bubble.
+ void ShowZoomBubble(int zoom_percent);
+
// Sets |preview_enabled| for the PageAction View associated with this
// |page_action|. If |preview_enabled| is true, the view will display the
// PageActions icon even though it has not been activated by the extension.
// This is used by the ExtensionInstalledBubble to preview what the icon
// will look like for the user upon installation of the extension.
- void SetPreviewEnabledPageAction(ExtensionAction *page_action,
+ void SetPreviewEnabledPageAction(ExtensionAction* page_action,
bool preview_enabled);
// Retrieves the PageAction View which is associated with |page_action|.
@@ -497,6 +508,9 @@ class LocationBarView : public LocationBar,
// The content setting views.
ContentSettingViews content_setting_views_;
+ // The zoom icon.
+ ZoomView* zoom_view_;
+
// The current page actions.
std::vector<ExtensionAction*> page_actions_;

Powered by Google App Engine
This is Rietveld 408576698