| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 return GetNativeTheme()->GetSystemColor(kTranslationTable[i].id); | 256 return GetNativeTheme()->GetSystemColor(kTranslationTable[i].id); |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 | 259 |
| 260 NOTREACHED(); | 260 NOTREACHED(); |
| 261 return SK_ColorRED; | 261 return SK_ColorRED; |
| 262 } | 262 } |
| 263 | 263 |
| 264 void OmniboxResultView::SetMatch(const AutocompleteMatch& match) { | 264 void OmniboxResultView::SetMatch(const AutocompleteMatch& match) { |
| 265 match_ = match; | 265 match_ = match; |
| 266 match_.PossiblySwapContentsAndDescriptionForDisplay(); |
| 266 ResetRenderTexts(); | 267 ResetRenderTexts(); |
| 267 animation_->Reset(); | 268 animation_->Reset(); |
| 268 answer_image_ = gfx::ImageSkia(); | 269 answer_image_ = gfx::ImageSkia(); |
| 269 | 270 |
| 270 AutocompleteMatch* associated_keyword_match = match_.associated_keyword.get(); | 271 AutocompleteMatch* associated_keyword_match = match_.associated_keyword.get(); |
| 271 if (associated_keyword_match) { | 272 if (associated_keyword_match) { |
| 272 keyword_icon_->SetImage(GetKeywordIcon()); | 273 keyword_icon_->SetImage(GetKeywordIcon()); |
| 273 if (!keyword_icon_->parent()) | 274 if (!keyword_icon_->parent()) |
| 274 AddChildView(keyword_icon_.get()); | 275 AddChildView(keyword_icon_.get()); |
| 275 } else if (keyword_icon_->parent()) { | 276 } else if (keyword_icon_->parent()) { |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 description_rendertext_->AppendText(text); | 725 description_rendertext_->AppendText(text); |
| 725 const TextStyle& text_style = GetTextStyle(text_type); | 726 const TextStyle& text_style = GetTextStyle(text_type); |
| 726 // TODO(dschuyler): follow up on the problem of different font sizes within | 727 // TODO(dschuyler): follow up on the problem of different font sizes within |
| 727 // one RenderText. | 728 // one RenderText. |
| 728 description_rendertext_->SetFontList( | 729 description_rendertext_->SetFontList( |
| 729 ui::ResourceBundle::GetSharedInstance().GetFontList(text_style.font)); | 730 ui::ResourceBundle::GetSharedInstance().GetFontList(text_style.font)); |
| 730 description_rendertext_->ApplyColor( | 731 description_rendertext_->ApplyColor( |
| 731 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); | 732 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); |
| 732 description_rendertext_->ApplyBaselineStyle(text_style.baseline, range); | 733 description_rendertext_->ApplyBaselineStyle(text_style.baseline, range); |
| 733 } | 734 } |
| OLD | NEW |