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

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

Issue 2834493007: MacViews: Allows the toolkit-views Zoom Dialog to be used (Closed)
Patch Set: MacViews: Allows the toolkit-views Zoom Dialog to be used (keep anchoring) Created 3 years, 8 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_bubble_view.h
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h
index 81db642872cf45c8f91ea5d44fa3edec6d52a2d3..1d2f2754faa15be9f6d1a83274df8b52af720df5 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h
@@ -33,6 +33,7 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView,
// Shows the bubble and automatically closes it after a short time period if
// |reason| is AUTOMATIC.
static void ShowBubble(content::WebContents* web_contents,
+ const gfx::Point& anchor_point,
DisplayReason reason);
// Closes the showing bubble (if one exists).
@@ -42,6 +43,10 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView,
// otherwise.
static ZoomBubbleView* GetZoomBubble();
+ // Refreshes the bubble by changing the zoom percentage appropriately and
+ // resetting the timer if necessary.
+ void Refresh();
+
private:
FRIEND_TEST_ALL_PREFIXES(ZoomBubbleBrowserTest, ImmersiveFullscreen);
@@ -64,7 +69,12 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView,
std::unique_ptr<const extensions::IconImage> icon_image;
};
+ // Constructs ZoomBubbleView. Anchors the bubble to |anchor_view| when it is
+ // not nullptr or alternatively, to |anchor_point|. The bubble will auto-close
+ // when |reason| is AUTOMATIC. If |immersive_mode_controller_| is present, the
+ // bubble will auto-close when the top-of-window views are revealed.
ZoomBubbleView(views::View* anchor_view,
+ const gfx::Point& anchor_point,
content::WebContents* web_contents,
DisplayReason reason,
ImmersiveModeController* immersive_mode_controller);
@@ -88,10 +98,6 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView,
// extensions::IconImage::Observer:
void OnExtensionIconImageChanged(extensions::IconImage* /* image */) override;
- // Refreshes the bubble by changing the zoom percentage appropriately and
- // resetting the timer if necessary.
- void Refresh();
-
// Sets information about the extension that initiated the zoom change.
// Calling this method asserts that the extension |extension| did initiate
// the zoom change.
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698