| 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 // When used in the app launcher, don't draw a border, the LocationBarView has | 644 // When used in the app launcher, don't draw a border, the LocationBarView has |
| 645 // its own views::Border. | 645 // its own views::Border. |
| 646 | 646 |
| 647 // Draw the background color so that the graphical elements at the edges | 647 // Draw the background color so that the graphical elements at the edges |
| 648 // appear over the correct color. (The edit draws its own background, so this | 648 // appear over the correct color. (The edit draws its own background, so this |
| 649 // isn't important for that.) | 649 // isn't important for that.) |
| 650 // TODO(pkasting): We need images that are transparent in the middle, so we | 650 // TODO(pkasting): We need images that are transparent in the middle, so we |
| 651 // can draw the border images over the background color instead of the | 651 // can draw the border images over the background color instead of the |
| 652 // reverse; this antialiases better (see comments in | 652 // reverse; this antialiases better (see comments in |
| 653 // AutocompletePopupContentsView::Paint()). | 653 // AutocompletePopupContentsView::Paint()). |
| 654 gfx::Rect bounds(GetLocalBounds()); | 654 gfx::Rect bounds(GetContentsBounds()); |
| 655 bounds.Inset(0, kVerticalEdgeThickness); | 655 bounds.Inset(0, kVerticalEdgeThickness); |
| 656 SkColor color(GetColor(ToolbarModel::NONE, BACKGROUND)); | 656 SkColor color(GetColor(ToolbarModel::NONE, BACKGROUND)); |
| 657 if (mode_ == NORMAL) { | 657 if (mode_ == NORMAL) { |
| 658 SkPaint paint; | 658 SkPaint paint; |
| 659 paint.setColor(color); | 659 paint.setColor(color); |
| 660 paint.setStyle(SkPaint::kFill_Style); | 660 paint.setStyle(SkPaint::kFill_Style); |
| 661 paint.setAntiAlias(true); | 661 paint.setAntiAlias(true); |
| 662 // The round corners of the omnibox match the round corners of the dropdown | 662 // The round corners of the omnibox match the round corners of the dropdown |
| 663 // below, and all our other bubbles. | 663 // below, and all our other bubbles. |
| 664 const SkScalar radius(SkIntToScalar(BubbleBorder::GetCornerRadius())); | 664 const SkScalar radius(SkIntToScalar(BubbleBorder::GetCornerRadius())); |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 template_url_model_ = NULL; | 1222 template_url_model_ = NULL; |
| 1223 ShowFirstRunBubble(bubble_type_); | 1223 ShowFirstRunBubble(bubble_type_); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 #if defined(OS_WIN) | 1226 #if defined(OS_WIN) |
| 1227 bool LocationBarView::HasValidSuggestText() { | 1227 bool LocationBarView::HasValidSuggestText() { |
| 1228 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && | 1228 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && |
| 1229 !suggested_text_view_->GetText().empty(); | 1229 !suggested_text_view_->GetText().empty(); |
| 1230 } | 1230 } |
| 1231 #endif | 1231 #endif |
| OLD | NEW |