| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 "chrome/views/controls/button/button.h" | 10 #include "chrome/views/controls/button/button.h" |
| 11 #include "chrome/views/controls/text_field.h" | 11 #include "chrome/views/controls/text_field.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); |
| 70 virtual void HandleKeystroke(views::TextField* sender, UINT message, | 70 virtual bool HandleKeystroke(views::TextField* sender, UINT message, |
| 71 TCHAR key, UINT repeat_count, UINT flags); | 71 TCHAR key, UINT repeat_count, UINT flags); |
| 72 | 72 |
| 73 // Set whether or not we're attempting to blend with the toolbar. | 73 // Set whether or not we're attempting to blend with the toolbar. |
| 74 void set_toolbar_blend(bool toolbar_blend) { toolbar_blend_ = toolbar_blend; } | 74 void set_toolbar_blend(bool toolbar_blend) { toolbar_blend_ = toolbar_blend; } |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 // Resets the background for the match count label. | 77 // Resets the background for the match count label. |
| 78 void ResetMatchCountBackground(); | 78 void ResetMatchCountBackground(); |
| 79 | 79 |
| 80 // We use a hidden view to grab mouse clicks and bring focus to the find | 80 // We use a hidden view to grab mouse clicks and bring focus to the find |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // While animating, the controller clips the window and draws only the bottom | 119 // While animating, the controller clips the window and draws only the bottom |
| 120 // part of it. The view needs to know the pixel offset at which we are drawing | 120 // part of it. The view needs to know the pixel offset at which we are drawing |
| 121 // the window so that we can draw the curved edges that attach to the toolbar | 121 // the window so that we can draw the curved edges that attach to the toolbar |
| 122 // in the right location. | 122 // in the right location. |
| 123 int animation_offset_; | 123 int animation_offset_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(FindBarView); | 125 DISALLOW_COPY_AND_ASSIGN(FindBarView); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ | 128 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_VIEW_H_ |
| OLD | NEW |