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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.cc

Issue 152343006: Clean-up: Replaces obsolete Font/FontList methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 10 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 // 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const gfx::FontList& font_list) 110 const gfx::FontList& font_list)
111 : edge_item_padding_(LocationBarView::GetItemPadding()), 111 : edge_item_padding_(LocationBarView::GetItemPadding()),
112 item_padding_(LocationBarView::GetItemPadding()), 112 item_padding_(LocationBarView::GetItemPadding()),
113 minimum_text_vertical_padding_(kMinimumTextVerticalPadding), 113 minimum_text_vertical_padding_(kMinimumTextVerticalPadding),
114 model_(model), 114 model_(model),
115 model_index_(model_index), 115 model_index_(model_index),
116 location_bar_view_(location_bar_view), 116 location_bar_view_(location_bar_view),
117 font_list_(font_list), 117 font_list_(font_list),
118 font_height_( 118 font_height_(
119 std::max(font_list.GetHeight(), 119 std::max(font_list.GetHeight(),
120 font_list.DeriveFontListWithSizeDeltaAndStyle( 120 font_list.DeriveWithStyle(gfx::Font::BOLD).GetHeight())),
121 0, gfx::Font::BOLD).GetHeight())),
122 ellipsis_width_(gfx::GetStringWidth(base::string16(kEllipsis), 121 ellipsis_width_(gfx::GetStringWidth(base::string16(kEllipsis),
123 font_list)), 122 font_list)),
124 mirroring_context_(new MirroringContext()), 123 mirroring_context_(new MirroringContext()),
125 keyword_icon_(new views::ImageView()), 124 keyword_icon_(new views::ImageView()),
126 animation_(new gfx::SlideAnimation(this)) { 125 animation_(new gfx::SlideAnimation(this)) {
127 CHECK_GE(model_index, 0); 126 CHECK_GE(model_index, 0);
128 if (default_icon_size_ == 0) { 127 if (default_icon_size_ == 0) {
129 default_icon_size_ = 128 default_icon_size_ =
130 location_bar_view_->GetThemeProvider()->GetImageSkiaNamed( 129 location_bar_view_->GetThemeProvider()->GetImageSkiaNamed(
131 AutocompleteMatch::TypeToIcon( 130 AutocompleteMatch::TypeToIcon(
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 int x = GetMirroredXForRect(keyword_text_bounds_); 469 int x = GetMirroredXForRect(keyword_text_bounds_);
471 mirroring_context_->Initialize(x, keyword_text_bounds_.width()); 470 mirroring_context_->Initialize(x, keyword_text_bounds_.width());
472 PaintMatch(canvas, *match_.associated_keyword.get(), x); 471 PaintMatch(canvas, *match_.associated_keyword.get(), x);
473 } 472 }
474 } 473 }
475 474
476 void OmniboxResultView::AnimationProgressed(const gfx::Animation* animation) { 475 void OmniboxResultView::AnimationProgressed(const gfx::Animation* animation) {
477 Layout(); 476 Layout();
478 SchedulePaint(); 477 SchedulePaint();
479 } 478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698