| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 icon = IDR_OMNIBOX_STAR_SELECTED; | 291 icon = IDR_OMNIBOX_STAR_SELECTED; |
| 292 break; | 292 break; |
| 293 default: | 293 default: |
| 294 NOTREACHED(); | 294 NOTREACHED(); |
| 295 break; | 295 break; |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); | 298 return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); |
| 299 } | 299 } |
| 300 | 300 |
| 301 const SkBitmap* AutocompleteResultView::GetKeywordIcon() const { | 301 const gfx::ImageSkia* AutocompleteResultView::GetKeywordIcon() const { |
| 302 // NOTE: If we ever begin returning icons of varying size, then callers need | 302 // NOTE: If we ever begin returning icons of varying size, then callers need |
| 303 // to ensure that |keyword_icon_| is resized each time its image is reset. | 303 // to ensure that |keyword_icon_| is resized each time its image is reset. |
| 304 return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( | 304 return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 305 (GetState() == SELECTED) ? IDR_OMNIBOX_TTS_SELECTED : IDR_OMNIBOX_TTS); | 305 (GetState() == SELECTED) ? IDR_OMNIBOX_TTS_SELECTED : IDR_OMNIBOX_TTS); |
| 306 } | 306 } |
| 307 | 307 |
| 308 int AutocompleteResultView::DrawString( | 308 int AutocompleteResultView::DrawString( |
| 309 gfx::Canvas* canvas, | 309 gfx::Canvas* canvas, |
| 310 const string16& text, | 310 const string16& text, |
| 311 const ACMatchClassifications& classifications, | 311 const ACMatchClassifications& classifications, |
| 312 bool force_dim, | 312 bool force_dim, |
| 313 int x, | 313 int x, |
| 314 int y) { | 314 int y) { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 mirroring_context_->Initialize(x, keyword_text_bounds_.width()); | 599 mirroring_context_->Initialize(x, keyword_text_bounds_.width()); |
| 600 PaintMatch(canvas, *match_.associated_keyword.get(), x); | 600 PaintMatch(canvas, *match_.associated_keyword.get(), x); |
| 601 } | 601 } |
| 602 } | 602 } |
| 603 | 603 |
| 604 void AutocompleteResultView::AnimationProgressed( | 604 void AutocompleteResultView::AnimationProgressed( |
| 605 const ui::Animation* animation) { | 605 const ui::Animation* animation) { |
| 606 Layout(); | 606 Layout(); |
| 607 SchedulePaint(); | 607 SchedulePaint(); |
| 608 } | 608 } |
| 609 | |
| OLD | NEW |