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

Unified Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 25373009: Translate: New Bubble UX (for the view toolkit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix: view id on tests Created 7 years, 2 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
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/ui/views/translate/translate_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index b9f31afc1ce50ba706d7a2845a5b79205dda9efc..603b1c96b9bd191e371710ec9af98687d4a0f996 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/views/home_button.h"
#include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
#include "chrome/browser/ui/views/location_bar/star_view.h"
+#include "chrome/browser/ui/views/location_bar/translate_icon_view.h"
#include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h"
#include "chrome/browser/ui/views/wrench_menu.h"
#include "chrome/browser/ui/views/wrench_toolbar_button.h"
@@ -289,6 +290,13 @@ views::View* ToolbarView::GetBookmarkBubbleAnchor() {
return app_menu_;
}
+views::View* ToolbarView::GetTranslateBubbleAnchor() {
+ views::View* translate_icon_view = location_bar()->translate_icon_view();
+ if (translate_icon_view)
+ return translate_icon_view;
+ return app_menu_;
+}
+
views::MenuButton* ToolbarView::app_menu() const {
return app_menu_;
}
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/ui/views/translate/translate_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698