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 #ifndef CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "chrome/browser/ui/views/dropdown_bar_view.h" | 10 #include "chrome/browser/ui/views/dropdown_bar_view.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // match_count label. The user, however, expects being able to click anywhere | 95 // match_count label. The user, however, expects being able to click anywhere |
96 // inside what looks like the find text box (including on or around the | 96 // inside what looks like the find text box (including on or around the |
97 // match_count label) and have focus brought to the find box. | 97 // match_count label) and have focus brought to the find box. |
98 class FocusForwarderView : public views::View { | 98 class FocusForwarderView : public views::View { |
99 public: | 99 public: |
100 explicit FocusForwarderView( | 100 explicit FocusForwarderView( |
101 views::Textfield* view_to_focus_on_mousedown) | 101 views::Textfield* view_to_focus_on_mousedown) |
102 : view_to_focus_on_mousedown_(view_to_focus_on_mousedown) {} | 102 : view_to_focus_on_mousedown_(view_to_focus_on_mousedown) {} |
103 | 103 |
104 private: | 104 private: |
105 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 105 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
106 | 106 |
107 views::Textfield* view_to_focus_on_mousedown_; | 107 views::Textfield* view_to_focus_on_mousedown_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(FocusForwarderView); | 109 DISALLOW_COPY_AND_ASSIGN(FocusForwarderView); |
110 }; | 110 }; |
111 | 111 |
112 // A wrapper of views::TextField that allows us to select all text when we | 112 // A wrapper of views::TextField that allows us to select all text when we |
113 // get focus. Represents the text field where the user enters a search term. | 113 // get focus. Represents the text field where the user enters a search term. |
114 class SearchTextfieldView : public views::Textfield { | 114 class SearchTextfieldView : public views::Textfield { |
115 public: | 115 public: |
(...skipping 25 matching lines...) Expand all Loading... |
141 // box to provide the Chrome look to the edge of the text box. | 141 // box to provide the Chrome look to the edge of the text box. |
142 const gfx::ImageSkia* text_box_background_; | 142 const gfx::ImageSkia* text_box_background_; |
143 | 143 |
144 // The rounded edge on the left side of the Find text box. | 144 // The rounded edge on the left side of the Find text box. |
145 const gfx::ImageSkia* text_box_background_left_; | 145 const gfx::ImageSkia* text_box_background_left_; |
146 | 146 |
147 DISALLOW_COPY_AND_ASSIGN(FindBarView); | 147 DISALLOW_COPY_AND_ASSIGN(FindBarView); |
148 }; | 148 }; |
149 | 149 |
150 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_ | 150 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_ |
OLD | NEW |