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 // For WinDDK ATL compatibility, these ATL headers must come first. | 5 // For WinDDK ATL compatibility, these ATL headers must come first. |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <atlbase.h> // NOLINT | 8 #include <atlbase.h> // NOLINT |
9 #include <atlwin.h> // NOLINT | 9 #include <atlwin.h> // NOLINT |
10 #endif | 10 #endif |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 icon = IDR_OMNIBOX_STAR_SELECTED; | 300 icon = IDR_OMNIBOX_STAR_SELECTED; |
301 break; | 301 break; |
302 default: | 302 default: |
303 NOTREACHED(); | 303 NOTREACHED(); |
304 break; | 304 break; |
305 } | 305 } |
306 } | 306 } |
307 return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); | 307 return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); |
308 } | 308 } |
309 | 309 |
310 const SkBitmap* AutocompleteResultView::GetKeywordIcon() const { | 310 const gfx::ImageSkia* AutocompleteResultView::GetKeywordIcon() const { |
311 // NOTE: If we ever begin returning icons of varying size, then callers need | 311 // NOTE: If we ever begin returning icons of varying size, then callers need |
312 // to ensure that |keyword_icon_| is resized each time its image is reset. | 312 // to ensure that |keyword_icon_| is resized each time its image is reset. |
313 return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( | 313 return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
314 (GetState() == SELECTED) ? IDR_OMNIBOX_TTS_SELECTED : IDR_OMNIBOX_TTS); | 314 (GetState() == SELECTED) ? IDR_OMNIBOX_TTS_SELECTED : IDR_OMNIBOX_TTS); |
315 } | 315 } |
316 | 316 |
317 int AutocompleteResultView::DrawString( | 317 int AutocompleteResultView::DrawString( |
318 gfx::Canvas* canvas, | 318 gfx::Canvas* canvas, |
319 const string16& text, | 319 const string16& text, |
320 const ACMatchClassifications& classifications, | 320 const ACMatchClassifications& classifications, |
321 bool force_dim, | 321 bool force_dim, |
322 int x, | 322 int x, |
323 int y) { | 323 int y) { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 mirroring_context_->Initialize(x, keyword_text_bounds_.width()); | 631 mirroring_context_->Initialize(x, keyword_text_bounds_.width()); |
632 PaintMatch(canvas, *match_.associated_keyword.get(), x); | 632 PaintMatch(canvas, *match_.associated_keyword.get(), x); |
633 } | 633 } |
634 } | 634 } |
635 | 635 |
636 void AutocompleteResultView::AnimationProgressed( | 636 void AutocompleteResultView::AnimationProgressed( |
637 const ui::Animation* animation) { | 637 const ui::Animation* animation) { |
638 Layout(); | 638 Layout(); |
639 SchedulePaint(); | 639 SchedulePaint(); |
640 } | 640 } |
641 | |
OLD | NEW |