| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/location_bar/translate_decoration.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/translate_decoration.h" |
| 6 | 6 |
| 7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/app/vector_icons/vector_icons.h" |
| 8 #include "chrome/browser/command_updater.h" | 9 #include "chrome/browser/command_updater.h" |
| 9 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" | 10 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" |
| 10 #include "chrome/grit/generated_resources.h" | 11 #include "chrome/grit/generated_resources.h" |
| 11 #include "chrome/grit/theme_resources.h" | 12 #include "chrome/grit/theme_resources.h" |
| 12 #include "ui/base/l10n/l10n_util_mac.h" | 13 #include "ui/base/l10n/l10n_util_mac.h" |
| 13 #include "ui/base/material_design/material_design_controller.h" | 14 #include "ui/base/material_design/material_design_controller.h" |
| 14 | 15 |
| 15 TranslateDecoration::TranslateDecoration(CommandUpdater* command_updater) | 16 TranslateDecoration::TranslateDecoration(CommandUpdater* command_updater) |
| 16 : command_updater_(command_updater) { | 17 : command_updater_(command_updater) { |
| 17 SetLit(false, false); | 18 SetLit(false, false); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 | 35 |
| 35 bool TranslateDecoration::OnMousePressed(NSRect frame, NSPoint location) { | 36 bool TranslateDecoration::OnMousePressed(NSRect frame, NSPoint location) { |
| 36 command_updater_->ExecuteCommand(IDC_TRANSLATE_PAGE); | 37 command_updater_->ExecuteCommand(IDC_TRANSLATE_PAGE); |
| 37 return true; | 38 return true; |
| 38 } | 39 } |
| 39 | 40 |
| 40 NSString* TranslateDecoration::GetToolTip() { | 41 NSString* TranslateDecoration::GetToolTip() { |
| 41 return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_TRANSLATE); | 42 return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_TRANSLATE); |
| 42 } | 43 } |
| 43 | 44 |
| 44 gfx::VectorIconId TranslateDecoration::GetMaterialVectorIconId() const { | 45 const gfx::VectorIcon* TranslateDecoration::GetMaterialVectorIcon() const { |
| 45 return gfx::VectorIconId::TRANSLATE; | 46 return &kTranslateIcon; |
| 46 } | 47 } |
| OLD | NEW |