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

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: groby's review Created 6 years, 10 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 bda15ea65f94d1b4f57139040d728ebc49ba6a10..cda90f02c5c3da39904d5ba59a0401bfeff65dc1 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
@@ -34,6 +34,7 @@ class Profile;
class SearchButtonDecoration;
class SelectedKeywordDecoration;
class StarDecoration;
+class TranslateDecoration;
class ZoomDecoration;
class ZoomDecorationTest;
@@ -88,6 +89,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).
@@ -102,6 +106,8 @@ class LocationBarViewMac : public LocationBar,
// aim at. Only works if IsStarEnabled returns YES.
NSPoint GetBookmarkBubblePoint() const;
+ NSPoint GetTranslateBubblePoint() const;
Robert Sesek 2014/02/27 20:45:01 Comment please.
hajimehoshi 2014/02/28 04:25:22 Done.
+
// Get the point in window coordinates in the security icon at which the page
// info bubble aims.
NSPoint GetPageInfoBubblePoint() const;
@@ -186,6 +192,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();
@@ -213,6 +223,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_;

Powered by Google App Engine
This is Rietveld 408576698