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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 paint.setStyle(SkPaint::kFill_Style); 741 paint.setStyle(SkPaint::kFill_Style);
742 paint.setAntiAlias(true); 742 paint.setAntiAlias(true);
743 // The round corners of the omnibox match the round corners of the dropdown 743 // The round corners of the omnibox match the round corners of the dropdown
744 // below, and all our other bubbles. 744 // below, and all our other bubbles.
745 const SkScalar radius(SkIntToScalar( 745 const SkScalar radius(SkIntToScalar(
746 views::BubbleBorder::GetCornerRadius())); 746 views::BubbleBorder::GetCornerRadius()));
747 bounds.Inset(kNormalHorizontalEdgeThickness, 0); 747 bounds.Inset(kNormalHorizontalEdgeThickness, 0);
748 canvas->GetSkCanvas()->drawRoundRect(gfx::RectToSkRect(bounds), radius, 748 canvas->GetSkCanvas()->drawRoundRect(gfx::RectToSkRect(bounds), radius,
749 radius, paint); 749 radius, paint);
750 } else { 750 } else {
751 canvas->FillRectInt(color, bounds.x(), bounds.y(), bounds.width(), 751 canvas->FillRect(color, bounds);
752 bounds.height());
753 } 752 }
754 753
755 if (show_focus_rect_ && HasFocus()) { 754 if (show_focus_rect_ && HasFocus()) {
756 gfx::Rect r = location_entry_view_->bounds(); 755 gfx::Rect r = location_entry_view_->bounds();
757 #if defined(OS_WIN) 756 #if defined(OS_WIN)
758 r.Inset(-1, -1); 757 r.Inset(-1, -1);
759 #else 758 #else
760 r.Inset(-1, 0); 759 r.Inset(-1, 0);
761 #endif 760 #endif
762 canvas->DrawFocusRect(r); 761 canvas->DrawFocusRect(r);
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 !suggested_text_view_->GetText().empty(); 1272 !suggested_text_view_->GetText().empty();
1274 } 1273 }
1275 1274
1276 #if !defined(USE_AURA) 1275 #if !defined(USE_AURA)
1277 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { 1276 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() {
1278 CHECK(!views::Widget::IsPureViews()); 1277 CHECK(!views::Widget::IsPureViews());
1279 return static_cast<OmniboxViewWin*>(location_entry_.get()); 1278 return static_cast<OmniboxViewWin*>(location_entry_.get());
1280 } 1279 }
1281 #endif 1280 #endif
1282 #endif 1281 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_background.cc ('k') | chrome/browser/ui/views/location_bar/suggested_text_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698