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

Unified Diff: chrome/browser/ui/views/location_bar/translate_icon_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/location_bar/translate_icon_view.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/translate_icon_view.cc
diff --git a/chrome/browser/ui/views/location_bar/translate_icon_view.cc b/chrome/browser/ui/views/location_bar/translate_icon_view.cc
new file mode 100644
index 0000000000000000000000000000000000000000..014138e5e4d018080e25f00da4de5de4c970c7cd
--- /dev/null
+++ b/chrome/browser/ui/views/location_bar/translate_icon_view.cc
@@ -0,0 +1,34 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/location_bar/translate_icon_view.h"
+
+#include "base/strings/utf_string_conversions.h"
+#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/view_ids.h"
+#include "chrome/browser/ui/views/translate/translate_bubble_view.h"
+#include "grit/generated_resources.h"
+#include "grit/theme_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
+
+TranslateIconView::TranslateIconView(CommandUpdater* command_updater)
+ : BubbleIconView(command_updater, IDC_TRANSLATE_PAGE) {
+ set_id(VIEW_ID_TRANSLATE_BUTTON);
+ SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_TRANSLATE));
+ SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_TRANSLATE));
+}
+
+TranslateIconView::~TranslateIconView() {
+}
+
+bool TranslateIconView::IsBubbleShowing() const {
+ return TranslateBubbleView::IsShowing();
+}
+
+void TranslateIconView::OnExecuting(
+ BubbleIconView::ExecuteSource execute_source) {
+}
« no previous file with comments | « chrome/browser/ui/views/location_bar/translate_icon_view.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698