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 #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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 paint.setStyle(SkPaint::kFill_Style); | 727 paint.setStyle(SkPaint::kFill_Style); |
728 paint.setAntiAlias(true); | 728 paint.setAntiAlias(true); |
729 // The round corners of the omnibox match the round corners of the dropdown | 729 // The round corners of the omnibox match the round corners of the dropdown |
730 // below, and all our other bubbles. | 730 // below, and all our other bubbles. |
731 const SkScalar radius(SkIntToScalar( | 731 const SkScalar radius(SkIntToScalar( |
732 views::BubbleBorder::GetCornerRadius())); | 732 views::BubbleBorder::GetCornerRadius())); |
733 bounds.Inset(kNormalHorizontalEdgeThickness, 0); | 733 bounds.Inset(kNormalHorizontalEdgeThickness, 0); |
734 canvas->GetSkCanvas()->drawRoundRect(gfx::RectToSkRect(bounds), radius, | 734 canvas->GetSkCanvas()->drawRoundRect(gfx::RectToSkRect(bounds), radius, |
735 radius, paint); | 735 radius, paint); |
736 } else { | 736 } else { |
737 canvas->FillRect(color, bounds); | 737 canvas->FillRect(bounds, color); |
738 } | 738 } |
739 | 739 |
740 if (show_focus_rect_ && HasFocus()) { | 740 if (show_focus_rect_ && HasFocus()) { |
741 gfx::Rect r = location_entry_view_->bounds(); | 741 gfx::Rect r = location_entry_view_->bounds(); |
742 #if defined(OS_WIN) | 742 #if defined(OS_WIN) |
743 r.Inset(-1, -1); | 743 r.Inset(-1, -1); |
744 #else | 744 #else |
745 r.Inset(-1, 0); | 745 r.Inset(-1, 0); |
746 #endif | 746 #endif |
747 canvas->DrawFocusRect(r); | 747 canvas->DrawFocusRect(r); |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 !suggested_text_view_->GetText().empty(); | 1243 !suggested_text_view_->GetText().empty(); |
1244 } | 1244 } |
1245 | 1245 |
1246 #if !defined(USE_AURA) | 1246 #if !defined(USE_AURA) |
1247 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { | 1247 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { |
1248 CHECK(!views::Widget::IsPureViews()); | 1248 CHECK(!views::Widget::IsPureViews()); |
1249 return static_cast<OmniboxViewWin*>(location_entry_.get()); | 1249 return static_cast<OmniboxViewWin*>(location_entry_.get()); |
1250 } | 1250 } |
1251 #endif | 1251 #endif |
1252 #endif | 1252 #endif |
OLD | NEW |