OLD | NEW |
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(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 SkColor color(GetColor(ToolbarModel::NONE, BACKGROUND)); | 690 SkColor color(GetColor(ToolbarModel::NONE, BACKGROUND)); |
691 if (mode_ == NORMAL) { | 691 if (mode_ == NORMAL) { |
692 SkPaint paint; | 692 SkPaint paint; |
693 paint.setColor(color); | 693 paint.setColor(color); |
694 paint.setStyle(SkPaint::kFill_Style); | 694 paint.setStyle(SkPaint::kFill_Style); |
695 paint.setAntiAlias(true); | 695 paint.setAntiAlias(true); |
696 // The round corners of the omnibox match the round corners of the dropdown | 696 // The round corners of the omnibox match the round corners of the dropdown |
697 // below, and all our other bubbles. | 697 // below, and all our other bubbles. |
698 const SkScalar radius(SkIntToScalar(BubbleBorder::GetCornerRadius())); | 698 const SkScalar radius(SkIntToScalar(BubbleBorder::GetCornerRadius())); |
699 bounds.Inset(kNormalHorizontalEdgeThickness, 0); | 699 bounds.Inset(kNormalHorizontalEdgeThickness, 0); |
700 canvas->AsCanvasSkia()->drawRoundRect(gfx::RectToSkRect(bounds), radius, | 700 canvas->AsCanvasSkia()->skia_canvas()->drawRoundRect( |
701 radius, paint); | 701 gfx::RectToSkRect(bounds), radius, radius, paint); |
702 } else { | 702 } else { |
703 canvas->FillRectInt(color, bounds.x(), bounds.y(), bounds.width(), | 703 canvas->FillRectInt(color, bounds.x(), bounds.y(), bounds.width(), |
704 bounds.height()); | 704 bounds.height()); |
705 } | 705 } |
706 | 706 |
707 if (show_focus_rect_ && HasFocus()) { | 707 if (show_focus_rect_ && HasFocus()) { |
708 gfx::Rect r = location_entry_view_->bounds(); | 708 gfx::Rect r = location_entry_view_->bounds(); |
709 #if defined(OS_WIN) | 709 #if defined(OS_WIN) |
710 canvas->DrawFocusRect(r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2); | 710 canvas->DrawFocusRect(r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2); |
711 #else | 711 #else |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 Update(NULL); | 1199 Update(NULL); |
1200 } | 1200 } |
1201 } | 1201 } |
1202 | 1202 |
1203 #if defined(OS_WIN) | 1203 #if defined(OS_WIN) |
1204 bool LocationBarView::HasValidSuggestText() const { | 1204 bool LocationBarView::HasValidSuggestText() const { |
1205 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && | 1205 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && |
1206 !suggested_text_view_->GetText().empty(); | 1206 !suggested_text_view_->GetText().empty(); |
1207 } | 1207 } |
1208 #endif | 1208 #endif |
OLD | NEW |