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 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 origin.set_x(width() - origin.x()); | 603 origin.set_x(width() - origin.x()); |
604 views::View::ConvertPointToScreen(this, &origin); | 604 views::View::ConvertPointToScreen(this, &origin); |
605 return origin; | 605 return origin; |
606 } | 606 } |
607 | 607 |
608 void LocationBarView::SetInstantSuggestion(const string16& text) { | 608 void LocationBarView::SetInstantSuggestion(const string16& text) { |
609 // Don't show the suggested text if inline autocomplete is prevented. | 609 // Don't show the suggested text if inline autocomplete is prevented. |
610 if (!text.empty()) { | 610 if (!text.empty()) { |
611 if (!suggested_text_view_) { | 611 if (!suggested_text_view_) { |
612 suggested_text_view_ = new views::Label(); | 612 suggested_text_view_ = new views::Label(); |
613 suggested_text_view_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 613 suggested_text_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
614 suggested_text_view_->SetAutoColorReadabilityEnabled(false); | 614 suggested_text_view_->SetAutoColorReadabilityEnabled(false); |
615 suggested_text_view_->SetEnabledColor(LocationBarView::GetColor( | 615 suggested_text_view_->SetEnabledColor(LocationBarView::GetColor( |
616 ToolbarModel::NONE, LocationBarView::DEEMPHASIZED_TEXT)); | 616 ToolbarModel::NONE, LocationBarView::DEEMPHASIZED_TEXT)); |
617 suggested_text_view_->SetText(text); | 617 suggested_text_view_->SetText(text); |
618 suggested_text_view_->SetFont(location_entry_->GetFont()); | 618 suggested_text_view_->SetFont(location_entry_->GetFont()); |
619 AddChildView(suggested_text_view_); | 619 AddChildView(suggested_text_view_); |
620 } else if (suggested_text_view_->text() != text) { | 620 } else if (suggested_text_view_->text() != text) { |
621 suggested_text_view_->SetText(text); | 621 suggested_text_view_->SetText(text); |
622 } | 622 } |
623 } else if (suggested_text_view_) { | 623 } else if (suggested_text_view_) { |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 } | 1588 } |
1589 | 1589 |
1590 void LocationBarView::CleanupFadeAnimation() { | 1590 void LocationBarView::CleanupFadeAnimation() { |
1591 // Since we're no longer animating we don't need our layer. | 1591 // Since we're no longer animating we don't need our layer. |
1592 SetPaintToLayer(false); | 1592 SetPaintToLayer(false); |
1593 // Bubble labels don't need a transparent background anymore. | 1593 // Bubble labels don't need a transparent background anymore. |
1594 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1594 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
1595 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1595 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
1596 } | 1596 } |
1597 #endif // USE_AURA | 1597 #endif // USE_AURA |
OLD | NEW |