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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/cocoa/location_bar/location_bar_view_mac.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 87a4ba5fd9c31e967d0781a5cbe116b73fa9a610..d752d364775b1fa13fbec9de5a6f655081d22d26 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -38,6 +38,7 @@ class SelectedKeywordDecoration;
class SkBitmap;
class StarDecoration;
class ToolbarModel;
+class ZoomDecoration;
// A C++ bridge class that represents the location bar UI element to
// the portable code. Wires up an OmniboxViewMac instance to
@@ -92,6 +93,12 @@ class LocationBarViewMac : public LocationBar,
// Set ChromeToMobileDecoration's lit state (to update the icon).
void SetChromeToMobileDecorationLit(bool lit);
+ // Happens when the zoom changes for the active tab. |can_show_bubble| = true
+ // indicates it's worth showing a bubble over this change, where as
+ // |can_show_bubble| = false means it probably wasn't a very interesting
+ // change (e.g. switching tabs, creating a new tab, creating a new browser).
+ void ZoomChangedForActiveTab(bool can_show_bubble);
+
// Get the point in window coordinates on the star for the bookmark bubble to
// aim at.
NSPoint GetBookmarkBubblePoint() const;
@@ -104,6 +111,10 @@ class LocationBarViewMac : public LocationBar,
// info bubble aims.
NSPoint GetPageInfoBubblePoint() const;
+ // When any image decorations change, call this to ensure everything is
+ // redrawn and laid out if necessary.
+ void OnImageDecorationsChanged();
+
// Updates the location bar. Resets the bar's permanent text and
// security style, and if |should_restore_state| is true, restores
// saved state from the tab (for tab switching).
@@ -223,6 +234,10 @@ class LocationBarViewMac : public LocationBar,
// Chrome To Mobile page action icon.
scoped_ptr<ChromeToMobileDecoration> chrome_to_mobile_decoration_;
+ // A zoom icon at the end of the omnibox, which shows at non-standard zoom
+ // levels.
+ scoped_ptr<ZoomDecoration> zoom_decoration_;
+
// The installed page actions.
std::vector<ExtensionAction*> page_actions_;

Powered by Google App Engine
This is Rietveld 408576698