| 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 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/ui/views/frame/browser_view.h" | 21 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
| 23 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
| 24 #include "grit/ui_resources.h" | 24 #include "grit/ui_resources.h" |
| 25 #include "third_party/skia/include/core/SkPaint.h" | 25 #include "third_party/skia/include/core/SkPaint.h" |
| 26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
| 27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
| 28 #include "ui/base/theme_provider.h" | 28 #include "ui/base/theme_provider.h" |
| 29 #include "ui/events/event.h" | 29 #include "ui/events/event.h" |
| 30 #include "ui/gfx/canvas.h" | 30 #include "ui/gfx/canvas.h" |
| 31 #include "ui/views/border.h" |
| 31 #include "ui/views/controls/button/image_button.h" | 32 #include "ui/views/controls/button/image_button.h" |
| 32 #include "ui/views/controls/label.h" | 33 #include "ui/views/controls/label.h" |
| 33 #include "ui/views/painter.h" | 34 #include "ui/views/painter.h" |
| 34 #include "ui/views/widget/widget.h" | 35 #include "ui/views/widget/widget.h" |
| 35 | 36 |
| 36 namespace { | 37 namespace { |
| 37 | 38 |
| 38 // The margins around the search field, match count label, and the close button. | 39 // The margins around the search field, match count label, and the close button. |
| 39 const int kMarginLeftOfCloseButton = 3; | 40 const int kMarginLeftOfCloseButton = 3; |
| 40 const int kMarginRightOfCloseButton = 7; | 41 const int kMarginRightOfCloseButton = 7; |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 490 |
| 490 void FindBarView::OnThemeChanged() { | 491 void FindBarView::OnThemeChanged() { |
| 491 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 492 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 492 if (GetThemeProvider()) { | 493 if (GetThemeProvider()) { |
| 493 close_button_->SetBackground( | 494 close_button_->SetBackground( |
| 494 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TAB_TEXT), | 495 GetThemeProvider()->GetColor(ThemeProperties::COLOR_TAB_TEXT), |
| 495 rb.GetImageSkiaNamed(IDR_CLOSE_1), | 496 rb.GetImageSkiaNamed(IDR_CLOSE_1), |
| 496 rb.GetImageSkiaNamed(IDR_CLOSE_1_MASK)); | 497 rb.GetImageSkiaNamed(IDR_CLOSE_1_MASK)); |
| 497 } | 498 } |
| 498 } | 499 } |
| OLD | NEW |