| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/views/find_bar_view.h" | 5 #include "chrome/browser/views/find_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 10 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 11 #include "chrome/browser/find_bar_controller.h" | 12 #include "chrome/browser/find_bar_controller.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
| 13 #include "chrome/browser/views/find_bar_win.h" | 14 #include "chrome/browser/views/find_bar_win.h" |
| 14 #include "chrome/browser/view_ids.h" | 15 #include "chrome/browser/view_ids.h" |
| 15 #include "chrome/common/l10n_util.h" | |
| 16 #include "chrome/common/gfx/chrome_canvas.h" | 16 #include "chrome/common/gfx/chrome_canvas.h" |
| 17 #include "chrome/views/background.h" | 17 #include "chrome/views/background.h" |
| 18 #include "chrome/views/controls/button/image_button.h" | 18 #include "chrome/views/controls/button/image_button.h" |
| 19 #include "chrome/views/controls/label.h" | 19 #include "chrome/views/controls/label.h" |
| 20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 21 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
| 22 #include "skia/include/SkGradientShader.h" | 22 #include "skia/include/SkGradientShader.h" |
| 23 | 23 |
| 24 // The amount of whitespace to have before the find button. | 24 // The amount of whitespace to have before the find button. |
| 25 static const int kWhiteSpaceAfterMatchCountLabel = 3; | 25 static const int kWhiteSpaceAfterMatchCountLabel = 3; |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 } | 508 } |
| 509 | 509 |
| 510 bool FindBarView::FocusForwarderView::OnMousePressed( | 510 bool FindBarView::FocusForwarderView::OnMousePressed( |
| 511 const views::MouseEvent& event) { | 511 const views::MouseEvent& event) { |
| 512 if (view_to_focus_on_mousedown_) { | 512 if (view_to_focus_on_mousedown_) { |
| 513 view_to_focus_on_mousedown_->ClearSelection(); | 513 view_to_focus_on_mousedown_->ClearSelection(); |
| 514 view_to_focus_on_mousedown_->RequestFocus(); | 514 view_to_focus_on_mousedown_->RequestFocus(); |
| 515 } | 515 } |
| 516 return true; | 516 return true; |
| 517 } | 517 } |
| OLD | NEW |