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

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

Issue 151283006: Mac OS X: Show the Translate icon on Omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue-307352-translate-bubble-2
Patch Set: Use kAnimateNone Created 6 years, 9 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 f6f27e85639da86c65eae0a1eb7ecb6f237f82e0..f50b1bfc5737c0dc9f0129c13327c50f5d97d279 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
@@ -35,6 +35,7 @@ class Profile;
class SearchButtonDecoration;
class SelectedKeywordDecoration;
class StarDecoration;
+class TranslateDecoration;
class ZoomDecoration;
class ZoomDecorationTest;
@@ -89,6 +90,9 @@ class LocationBarViewMac : public LocationBar,
// Set the starred state of the bookmark star.
void SetStarred(bool starred);
+ // Set whether or not the translate icon is lit.
+ void SetTranslateIconLit(bool on);
+
// Happens when the zoom changes for the active tab. |can_show_bubble| is
// false when the change in zoom for the active tab wasn't an explicit user
// action (e.g. switching tabs, creating a new tab, creating a new browser).
@@ -103,6 +107,10 @@ class LocationBarViewMac : public LocationBar,
// aim at. Only works if IsStarEnabled returns YES.
NSPoint GetBookmarkBubblePoint() const;
+ // Get the point in window coordinates on the star for the Translate bubble to
+ // aim at.
+ NSPoint GetTranslateBubblePoint() const;
+
// Get the point in window coordinates in the security icon at which the page
// info bubble aims.
NSPoint GetPageInfoBubblePoint() const;
@@ -190,6 +198,10 @@ class LocationBarViewMac : public LocationBar,
void ShowFirstRunBubbleInternal();
+ // Updates the translate decoration in the omnibox with the current translate
+ // state.
+ void UpdateTranslateDecoration();
+
// Updates the zoom decoration in the omnibox with the current zoom level.
void UpdateZoomDecoration();
@@ -217,6 +229,9 @@ class LocationBarViewMac : public LocationBar,
// Bookmark star right of page actions.
scoped_ptr<StarDecoration> star_decoration_;
+ // Translate icon at the end of the ominibox.
+ scoped_ptr<TranslateDecoration> translate_decoration_;
+
// A zoom icon at the end of the omnibox, which shows at non-standard zoom
// levels.
scoped_ptr<ZoomDecoration> zoom_decoration_;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698