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

Side by Side Diff: chrome/browser/ui/views/find_bar_view.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
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_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 close_button_->SetAccessibleName( 140 close_button_->SetAccessibleName(
141 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); 141 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
142 AddChildView(close_button_); 142 AddChildView(close_button_);
143 143
144 SetBackground(rb.GetImageSkiaNamed(IDR_FIND_DLG_LEFT_BACKGROUND), 144 SetBackground(rb.GetImageSkiaNamed(IDR_FIND_DLG_LEFT_BACKGROUND),
145 rb.GetImageSkiaNamed(IDR_FIND_DLG_RIGHT_BACKGROUND)); 145 rb.GetImageSkiaNamed(IDR_FIND_DLG_RIGHT_BACKGROUND));
146 146
147 SetBorder(IDR_FIND_DIALOG_LEFT, IDR_FIND_DIALOG_MIDDLE, 147 SetBorder(IDR_FIND_DIALOG_LEFT, IDR_FIND_DIALOG_MIDDLE,
148 IDR_FIND_DIALOG_RIGHT); 148 IDR_FIND_DIALOG_RIGHT);
149 149
150 preferred_height_ = rb.GetBitmapNamed(IDR_FIND_DIALOG_MIDDLE)->height(); 150 preferred_height_ = rb.GetImageSkiaNamed(IDR_FIND_DIALOG_MIDDLE)->height();
151 151
152 // Background images for the Find edit box. 152 // Background images for the Find edit box.
153 text_box_background_ = rb.GetBitmapNamed(IDR_FIND_BOX_BACKGROUND); 153 text_box_background_ = rb.GetImageSkiaNamed(IDR_FIND_BOX_BACKGROUND);
154 text_box_background_left_ = rb.GetBitmapNamed(IDR_FIND_BOX_BACKGROUND_LEFT); 154 text_box_background_left_ =
155 rb.GetImageSkiaNamed(IDR_FIND_BOX_BACKGROUND_LEFT);
155 156
156 EnableCanvasFlippingForRTLUI(true); 157 EnableCanvasFlippingForRTLUI(true);
157 } 158 }
158 159
159 FindBarView::~FindBarView() { 160 FindBarView::~FindBarView() {
160 } 161 }
161 162
162 void FindBarView::SetFindText(const string16& find_text) { 163 void FindBarView::SetFindText(const string16& find_text) {
163 find_text_->SetText(find_text); 164 find_text_->SetText(find_text);
164 } 165 }
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 487
487 void FindBarView::OnThemeChanged() { 488 void FindBarView::OnThemeChanged() {
488 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 489 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
489 if (GetThemeProvider()) { 490 if (GetThemeProvider()) {
490 close_button_->SetBackground( 491 close_button_->SetBackground(
491 GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT), 492 GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT),
492 rb.GetImageSkiaNamed(IDR_CLOSE_BAR), 493 rb.GetImageSkiaNamed(IDR_CLOSE_BAR),
493 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_MASK)); 494 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_MASK));
494 } 495 }
495 } 496 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.h ('k') | chrome/browser/ui/views/infobars/extension_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698