OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/find_bar_view.h" | 5 #include "chrome/browser/ui/views/find_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 find_next_button_->SetTooltipText( | 129 find_next_button_->SetTooltipText( |
130 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_NEXT_TOOLTIP)); | 130 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_NEXT_TOOLTIP)); |
131 find_next_button_->SetAccessibleName( | 131 find_next_button_->SetAccessibleName( |
132 l10n_util::GetStringUTF16(IDS_ACCNAME_NEXT)); | 132 l10n_util::GetStringUTF16(IDS_ACCNAME_NEXT)); |
133 AddChildView(find_next_button_); | 133 AddChildView(find_next_button_); |
134 | 134 |
135 close_button_ = new views::ImageButton(this); | 135 close_button_ = new views::ImageButton(this); |
136 close_button_->set_tag(CLOSE_TAG); | 136 close_button_->set_tag(CLOSE_TAG); |
137 close_button_->set_focusable(true); | 137 close_button_->set_focusable(true); |
138 close_button_->SetImage(views::CustomButton::STATE_NORMAL, | 138 close_button_->SetImage(views::CustomButton::STATE_NORMAL, |
139 rb.GetImageSkiaNamed(IDR_TAB_CLOSE)); | 139 rb.GetImageSkiaNamed(IDR_CLOSE_1)); |
140 close_button_->SetImage(views::CustomButton::STATE_HOVERED, | 140 close_button_->SetImage(views::CustomButton::STATE_HOVERED, |
141 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H)); | 141 rb.GetImageSkiaNamed(IDR_CLOSE_1_H)); |
142 close_button_->SetImage(views::CustomButton::STATE_PRESSED, | 142 close_button_->SetImage(views::CustomButton::STATE_PRESSED, |
143 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P)); | 143 rb.GetImageSkiaNamed(IDR_CLOSE_1_P)); |
144 close_button_->SetTooltipText( | 144 close_button_->SetTooltipText( |
145 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP)); | 145 l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP)); |
146 close_button_->SetAccessibleName( | 146 close_button_->SetAccessibleName( |
147 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); | 147 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); |
148 close_button_->SetAnimationDuration(0); | 148 close_button_->SetAnimationDuration(0); |
149 AddChildView(close_button_); | 149 AddChildView(close_button_); |
150 | 150 |
151 SetBackground(rb.GetImageSkiaNamed(IDR_FIND_DLG_LEFT_BACKGROUND), | 151 SetBackground(rb.GetImageSkiaNamed(IDR_FIND_DLG_LEFT_BACKGROUND), |
152 rb.GetImageSkiaNamed(IDR_FIND_DLG_RIGHT_BACKGROUND)); | 152 rb.GetImageSkiaNamed(IDR_FIND_DLG_RIGHT_BACKGROUND)); |
153 | 153 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 | 513 |
514 FindBarHost* FindBarView::find_bar_host() const { | 514 FindBarHost* FindBarView::find_bar_host() const { |
515 return static_cast<FindBarHost*>(host()); | 515 return static_cast<FindBarHost*>(host()); |
516 } | 516 } |
517 | 517 |
518 void FindBarView::OnThemeChanged() { | 518 void FindBarView::OnThemeChanged() { |
519 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 519 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
520 if (GetThemeProvider()) { | 520 if (GetThemeProvider()) { |
521 close_button_->SetBackground( | 521 close_button_->SetBackground( |
522 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TAB_TEXT), | 522 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TAB_TEXT), |
523 rb.GetImageSkiaNamed(IDR_TAB_CLOSE), | 523 rb.GetImageSkiaNamed(IDR_CLOSE_1), |
524 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK)); | 524 rb.GetImageSkiaNamed(IDR_CLOSE_1_MASK)); |
525 } | 525 } |
526 } | 526 } |
OLD | NEW |