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

Side by Side Diff: chrome/browser/ui/views/translate/translate_icon_view.cc

Issue 2644903004: Move around more vector icons. (Closed)
Patch Set: fix comment Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/translate/translate_icon_view.h" 5 #include "chrome/browser/ui/views/translate/translate_icon_view.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/app/vector_icons/vector_icons.h"
10 #include "chrome/browser/ui/browser_commands.h" 11 #include "chrome/browser/ui/browser_commands.h"
11 #include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h" 12 #include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h"
12 #include "chrome/browser/ui/view_ids.h" 13 #include "chrome/browser/ui/view_ids.h"
13 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" 14 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
14 #include "chrome/grit/generated_resources.h" 15 #include "chrome/grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/gfx/vector_icons_public.h"
18 18
19 TranslateIconView::TranslateIconView(CommandUpdater* command_updater) 19 TranslateIconView::TranslateIconView(CommandUpdater* command_updater)
20 : BubbleIconView(command_updater, IDC_TRANSLATE_PAGE) { 20 : BubbleIconView(command_updater, IDC_TRANSLATE_PAGE) {
21 set_id(VIEW_ID_TRANSLATE_BUTTON); 21 set_id(VIEW_ID_TRANSLATE_BUTTON);
22 SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_TRANSLATE)); 22 SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_TRANSLATE));
23 } 23 }
24 24
25 TranslateIconView::~TranslateIconView() {} 25 TranslateIconView::~TranslateIconView() {}
26 26
27 void TranslateIconView::OnExecuting( 27 void TranslateIconView::OnExecuting(
28 BubbleIconView::ExecuteSource execute_source) {} 28 BubbleIconView::ExecuteSource execute_source) {}
29 29
30 void TranslateIconView::OnPressed(bool activated) { 30 void TranslateIconView::OnPressed(bool activated) {
31 translate::ReportUiAction((activated 31 translate::ReportUiAction((activated
32 ? translate::PAGE_ACTION_ICON_ACTIVATED 32 ? translate::PAGE_ACTION_ICON_ACTIVATED
33 : translate::PAGE_ACTION_ICON_DEACTIVATED)); 33 : translate::PAGE_ACTION_ICON_DEACTIVATED));
34 } 34 }
35 35
36 views::BubbleDialogDelegateView* TranslateIconView::GetBubble() const { 36 views::BubbleDialogDelegateView* TranslateIconView::GetBubble() const {
37 return TranslateBubbleView::GetCurrentBubble(); 37 return TranslateBubbleView::GetCurrentBubble();
38 } 38 }
39 39
40 gfx::VectorIconId TranslateIconView::GetVectorIcon() const { 40 const gfx::VectorIcon& TranslateIconView::GetVectorIcon() const {
41 return gfx::VectorIconId::TRANSLATE; 41 return kTranslateIcon;
42 } 42 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/translate/translate_icon_view.h ('k') | components/omnibox/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698