| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/gfx/size.h" | 8 #include "base/gfx/size.h" |
| 9 #include "chrome/browser/find_notification_details.h" | 9 #include "chrome/browser/find_notification_details.h" |
| 10 #include "views/controls/button/button.h" | 10 #include "views/controls/button/button.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 const std::wstring& find_text); | 49 const std::wstring& find_text); |
| 50 | 50 |
| 51 // Claims focus for the text field and selects its contents. | 51 // Claims focus for the text field and selects its contents. |
| 52 void SetFocusAndSelection(); | 52 void SetFocusAndSelection(); |
| 53 | 53 |
| 54 // Updates the view to let it know where the controller is clipping the | 54 // Updates the view to let it know where the controller is clipping the |
| 55 // Find window (while animating the opening or closing of the window). | 55 // Find window (while animating the opening or closing of the window). |
| 56 void animation_offset(int offset) { animation_offset_ = offset; } | 56 void animation_offset(int offset) { animation_offset_ = offset; } |
| 57 | 57 |
| 58 // Overridden from views::View: | 58 // Overridden from views::View: |
| 59 virtual void Paint(ChromeCanvas* canvas); | 59 virtual void Paint(gfx::Canvas* canvas); |
| 60 virtual void Layout(); | 60 virtual void Layout(); |
| 61 virtual gfx::Size GetPreferredSize(); | 61 virtual gfx::Size GetPreferredSize(); |
| 62 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 62 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
| 63 | 63 |
| 64 // Overridden from views::ButtonListener: | 64 // Overridden from views::ButtonListener: |
| 65 virtual void ButtonPressed(views::Button* sender); | 65 virtual void ButtonPressed(views::Button* sender); |
| 66 | 66 |
| 67 // Overridden from views::TextField::Controller: | 67 // Overridden from views::TextField::Controller: |
| 68 virtual void ContentsChanged(views::TextField* sender, | 68 virtual void ContentsChanged(views::TextField* sender, |
| 69 const std::wstring& new_contents); | 69 const std::wstring& new_contents); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // While animating, the controller clips the window and draws only the bottom | 116 // While animating, the controller clips the window and draws only the bottom |
| 117 // part of it. The view needs to know the pixel offset at which we are drawing | 117 // part of it. The view needs to know the pixel offset at which we are drawing |
| 118 // the window so that we can draw the curved edges that attach to the toolbar | 118 // the window so that we can draw the curved edges that attach to the toolbar |
| 119 // in the right location. | 119 // in the right location. |
| 120 int animation_offset_; | 120 int animation_offset_; |
| 121 | 121 |
| 122 DISALLOW_COPY_AND_ASSIGN(FindBarView); | 122 DISALLOW_COPY_AND_ASSIGN(FindBarView); |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ | 125 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ |
| OLD | NEW |