| 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/find_bar_view.h" | 5 #include "chrome/browser/ui/views/find_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 608 |
| 609 if (no_match) { | 609 if (no_match) { |
| 610 match_count_text_->SetBackgroundColor(kBackgroundColorNoMatch); | 610 match_count_text_->SetBackgroundColor(kBackgroundColorNoMatch); |
| 611 match_count_text_->SetEnabledColor(kTextColorNoMatch); | 611 match_count_text_->SetEnabledColor(kTextColorNoMatch); |
| 612 } else { | 612 } else { |
| 613 match_count_text_->SetBackgroundColor(kBackgroundColorMatch); | 613 match_count_text_->SetBackgroundColor(kBackgroundColorMatch); |
| 614 match_count_text_->SetEnabledColor(kTextColorMatchCount); | 614 match_count_text_->SetEnabledColor(kTextColorMatchCount); |
| 615 } | 615 } |
| 616 } | 616 } |
| 617 | 617 |
| 618 FindBarView::FocusForwarderView::FocusForwarderView( |
| 619 views::Textfield* view_to_focus_on_mousedown) |
| 620 : view_to_focus_on_mousedown_(view_to_focus_on_mousedown) {} |
| 621 |
| 618 bool FindBarView::FocusForwarderView::OnMousePressed( | 622 bool FindBarView::FocusForwarderView::OnMousePressed( |
| 619 const ui::MouseEvent& event) { | 623 const ui::MouseEvent& event) { |
| 620 if (view_to_focus_on_mousedown_) | 624 if (view_to_focus_on_mousedown_) |
| 621 view_to_focus_on_mousedown_->RequestFocus(); | 625 view_to_focus_on_mousedown_->RequestFocus(); |
| 622 return true; | 626 return true; |
| 623 } | 627 } |
| 624 | 628 |
| 625 FindBarHost* FindBarView::find_bar_host() const { | 629 FindBarHost* FindBarView::find_bar_host() const { |
| 626 return static_cast<FindBarHost*>(host()); | 630 return static_cast<FindBarHost*>(host()); |
| 627 } | 631 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 655 SkColor text_color = | 659 SkColor text_color = |
| 656 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor); | 660 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor); |
| 657 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69)); | 661 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69)); |
| 658 separator_->SetColor(SkColorSetA(text_color, 0x26)); | 662 separator_->SetColor(SkColorSetA(text_color, 0x26)); |
| 659 } | 663 } |
| 660 | 664 |
| 661 SkColor FindBarView::GetTextColorForIcon() { | 665 SkColor FindBarView::GetTextColorForIcon() { |
| 662 return GetNativeTheme()->GetSystemColor( | 666 return GetNativeTheme()->GetSystemColor( |
| 663 ui::NativeTheme::kColorId_TextfieldDefaultColor); | 667 ui::NativeTheme::kColorId_TextfieldDefaultColor); |
| 664 } | 668 } |
| OLD | NEW |