Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/location_bar/mic_search_view.h" | 5 #include "chrome/browser/ui/views/location_bar/mic_search_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
| 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | |
| 8 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 9 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
| 10 #include "ui/base/accessibility/accessible_view_state.h" | 11 #include "ui/base/accessibility/accessible_view_state.h" |
| 11 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
| 13 | 14 |
| 14 MicSearchView::MicSearchView(views::ButtonListener* button_listener) | 15 MicSearchView::MicSearchView(views::ButtonListener* button_listener) |
|
Peter Kasting
2013/08/06 20:32:42
Nit: This class is now so simple that perhaps it m
tfarina
2013/08/07 18:42:53
Done.
| |
| 15 : views::ImageButton(button_listener) { | 16 : views::ImageButton(button_listener) { |
| 16 set_id(VIEW_ID_MIC_SEARCH_BUTTON); | 17 set_id(VIEW_ID_MIC_SEARCH_BUTTON); |
| 17 set_accessibility_focusable(true); | 18 set_accessibility_focusable(true); |
| 18 SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_MIC_SEARCH)); | 19 SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_MIC_SEARCH)); |
| 19 SetImage(STATE_NORMAL, | 20 SetImage(STATE_NORMAL, |
| 20 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 21 ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 21 IDR_OMNIBOX_MIC_SEARCH)); | 22 IDR_OMNIBOX_MIC_SEARCH)); |
| 22 SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE); | 23 SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE); |
| 23 TouchableLocationBarView::Init(this); | 24 LocationBarView::InitTouchableLocationBarView(this); |
| 24 } | 25 } |
| 25 | 26 |
| 26 MicSearchView::~MicSearchView() { | 27 MicSearchView::~MicSearchView() { |
| 27 } | 28 } |
| 28 | |
| 29 int MicSearchView::GetBuiltInHorizontalPadding() const { | |
| 30 return GetBuiltInHorizontalPaddingImpl(); | |
| 31 } | |
| OLD | NEW |