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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 int center_; | 119 int center_; |
120 int right_; | 120 int right_; |
121 | 121 |
122 DISALLOW_COPY_AND_ASSIGN(MirroringContext); | 122 DISALLOW_COPY_AND_ASSIGN(MirroringContext); |
123 }; | 123 }; |
124 | 124 |
125 OmniboxResultView::OmniboxResultView(OmniboxPopupContentsView* model, | 125 OmniboxResultView::OmniboxResultView(OmniboxPopupContentsView* model, |
126 int model_index, | 126 int model_index, |
127 LocationBarView* location_bar_view, | 127 LocationBarView* location_bar_view, |
128 const gfx::FontList& font_list) | 128 const gfx::FontList& font_list) |
129 : edge_item_padding_(LocationBarView::GetItemPadding()), | 129 : edge_item_padding_(LocationBarView::kItemPadding), |
130 item_padding_(LocationBarView::GetItemPadding()), | 130 item_padding_(LocationBarView::kItemPadding), |
131 minimum_text_vertical_padding_(kMinimumTextVerticalPadding), | 131 minimum_text_vertical_padding_(kMinimumTextVerticalPadding), |
132 model_(model), | 132 model_(model), |
133 model_index_(model_index), | 133 model_index_(model_index), |
134 location_bar_view_(location_bar_view), | 134 location_bar_view_(location_bar_view), |
135 font_list_(font_list), | 135 font_list_(font_list), |
136 font_height_( | 136 font_height_( |
137 std::max(font_list.GetHeight(), | 137 std::max(font_list.GetHeight(), |
138 font_list.DeriveWithStyle(gfx::Font::BOLD).GetHeight())), | 138 font_list.DeriveWithStyle(gfx::Font::BOLD).GetHeight())), |
139 mirroring_context_(new MirroringContext()), | 139 mirroring_context_(new MirroringContext()), |
140 keyword_icon_(new views::ImageView()), | 140 keyword_icon_(new views::ImageView()), |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 } | 555 } |
556 PaintMatch(*keyword_match, keyword_contents_rendertext_.get(), | 556 PaintMatch(*keyword_match, keyword_contents_rendertext_.get(), |
557 keyword_description_rendertext_.get(), canvas, x); | 557 keyword_description_rendertext_.get(), canvas, x); |
558 } | 558 } |
559 } | 559 } |
560 | 560 |
561 void OmniboxResultView::AnimationProgressed(const gfx::Animation* animation) { | 561 void OmniboxResultView::AnimationProgressed(const gfx::Animation* animation) { |
562 Layout(); | 562 Layout(); |
563 SchedulePaint(); | 563 SchedulePaint(); |
564 } | 564 } |
OLD | NEW |