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

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

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_(std::max(font_list.GetHeight(), 118 font_height_(std::max(font_list.GetHeight(),
119 font_list.DeriveFontList(gfx::BOLD).GetHeight())), 119 font_list.DeriveFontList(gfx::BOLD).GetHeight())),
120 ellipsis_width_(font_list.GetPrimaryFont().GetStringWidth( 120 ellipsis_width_(font_list.GetPrimaryFont().GetStringWidth(
121 string16(kEllipsis))), 121 string16(kEllipsis))),
122 mirroring_context_(new MirroringContext()), 122 mirroring_context_(new MirroringContext()),
123 keyword_icon_(new views::ImageView()), 123 keyword_icon_(new views::ImageView()),
124 animation_(new ui::SlideAnimation(this)) { 124 animation_(new gfx::SlideAnimation(this)) {
125 CHECK_GE(model_index, 0); 125 CHECK_GE(model_index, 0);
126 if (default_icon_size_ == 0) { 126 if (default_icon_size_ == 0) {
127 default_icon_size_ = 127 default_icon_size_ =
128 location_bar_view_->GetThemeProvider()->GetImageSkiaNamed( 128 location_bar_view_->GetThemeProvider()->GetImageSkiaNamed(
129 AutocompleteMatch::TypeToIcon( 129 AutocompleteMatch::TypeToIcon(
130 AutocompleteMatchType::URL_WHAT_YOU_TYPED))->width(); 130 AutocompleteMatchType::URL_WHAT_YOU_TYPED))->width();
131 } 131 }
132 keyword_icon_->set_owned_by_client(); 132 keyword_icon_->set_owned_by_client();
133 keyword_icon_->EnableCanvasFlippingForRTLUI(true); 133 keyword_icon_->EnableCanvasFlippingForRTLUI(true);
134 keyword_icon_->SetImage(GetKeywordIcon()); 134 keyword_icon_->SetImage(GetKeywordIcon());
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 } 620 }
621 621
622 if (match_.associated_keyword.get()) { 622 if (match_.associated_keyword.get()) {
623 // Paint the keyword text. 623 // Paint the keyword text.
624 int x = GetMirroredXForRect(keyword_text_bounds_); 624 int x = GetMirroredXForRect(keyword_text_bounds_);
625 mirroring_context_->Initialize(x, keyword_text_bounds_.width()); 625 mirroring_context_->Initialize(x, keyword_text_bounds_.width());
626 PaintMatch(canvas, *match_.associated_keyword.get(), x); 626 PaintMatch(canvas, *match_.associated_keyword.get(), x);
627 } 627 }
628 } 628 }
629 629
630 void OmniboxResultView::AnimationProgressed(const ui::Animation* animation) { 630 void OmniboxResultView::AnimationProgressed(const gfx::Animation* animation) {
631 Layout(); 631 Layout();
632 SchedulePaint(); 632 SchedulePaint();
633 } 633 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.h ('k') | chrome/browser/ui/views/panels/panel_stack_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698