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/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/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
14 #include "chrome/browser/themes/browser_theme_provider.h" | 14 #include "chrome/browser/themes/browser_theme_provider.h" |
15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
16 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 16 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
17 #include "chrome/browser/ui/find_bar/find_manager.h" | 17 #include "chrome/browser/ui/find_bar/find_manager.h" |
18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
19 #include "chrome/browser/ui/view_ids.h" | 19 #include "chrome/browser/ui/view_ids.h" |
20 #include "chrome/browser/ui/views/find_bar_host.h" | 20 #include "chrome/browser/ui/views/find_bar_host.h" |
21 #include "chrome/browser/ui/views/frame/browser_view.h" | 21 #include "chrome/browser/ui/views/frame/browser_view.h" |
22 #include "gfx/canvas.h" | |
23 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
24 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
25 #include "third_party/skia/include/effects/SkGradientShader.h" | 24 #include "third_party/skia/include/effects/SkGradientShader.h" |
26 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
27 #include "ui/base/resource/resource_bundle.h" | 26 #include "ui/base/resource/resource_bundle.h" |
| 27 #include "ui/gfx/canvas.h" |
28 #include "views/background.h" | 28 #include "views/background.h" |
29 #include "views/controls/button/image_button.h" | 29 #include "views/controls/button/image_button.h" |
30 #include "views/controls/label.h" | 30 #include "views/controls/label.h" |
31 #include "views/focus/focus_manager.h" | 31 #include "views/focus/focus_manager.h" |
32 #include "views/widget/widget.h" | 32 #include "views/widget/widget.h" |
33 | 33 |
34 // The amount of whitespace to have before the find button. | 34 // The amount of whitespace to have before the find button. |
35 static const int kWhiteSpaceAfterMatchCountLabel = 1; | 35 static const int kWhiteSpaceAfterMatchCountLabel = 1; |
36 | 36 |
37 // The margins around the search field and the close button. | 37 // The margins around the search field and the close button. |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 568 |
569 void FindBarView::OnThemeChanged() { | 569 void FindBarView::OnThemeChanged() { |
570 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 570 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
571 if (GetThemeProvider()) { | 571 if (GetThemeProvider()) { |
572 close_button_->SetBackground( | 572 close_button_->SetBackground( |
573 GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), | 573 GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), |
574 rb.GetBitmapNamed(IDR_CLOSE_BAR), | 574 rb.GetBitmapNamed(IDR_CLOSE_BAR), |
575 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); | 575 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); |
576 } | 576 } |
577 } | 577 } |
OLD | NEW |