| 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 #ifndef CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ | 6 #define CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ |
| 7 | 7 |
| 8 #include "base/gfx/rect.h" | 8 #include "base/gfx/rect.h" |
| 9 #include "chrome/browser/find_bar.h" | 9 #include "chrome/browser/find_bar.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 10 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Whether we are animating the position of the Find window. | 52 // Whether we are animating the position of the Find window. |
| 53 bool IsAnimating(); | 53 bool IsAnimating(); |
| 54 | 54 |
| 55 // We need to monitor focus changes so that we can register a handler for | 55 // We need to monitor focus changes so that we can register a handler for |
| 56 // Escape when we get focus and unregister it when we looses focus. This | 56 // Escape when we get focus and unregister it when we looses focus. This |
| 57 // function unregisters our old Escape accelerator (if registered) and | 57 // function unregisters our old Escape accelerator (if registered) and |
| 58 // registers a new one with the FocusManager associated with the | 58 // registers a new one with the FocusManager associated with the |
| 59 // new |parent_hwnd|. | 59 // new |parent_hwnd|. |
| 60 void SetFocusChangeListener(HWND parent_hwnd); | 60 void SetFocusChangeListener(HWND parent_hwnd); |
| 61 | 61 |
| 62 // Forwards keystrokes to the renderer. This is useful to make sure that |
| 63 // arrow keys and PageUp and PageDown result in scrolling, instead of |
| 64 // being eaten because the FindBar has focus. |
| 65 void ForwardKeystrokeToWebpage(TCHAR key); |
| 66 |
| 62 // FindBar implementation: | 67 // FindBar implementation: |
| 63 virtual FindBarController* GetFindBarController() const { | 68 virtual FindBarController* GetFindBarController() const { |
| 64 return find_bar_controller_; | 69 return find_bar_controller_; |
| 65 } | 70 } |
| 66 virtual void SetFindBarController(FindBarController* find_bar_controller) { | 71 virtual void SetFindBarController(FindBarController* find_bar_controller) { |
| 67 find_bar_controller_ = find_bar_controller; | 72 find_bar_controller_ = find_bar_controller; |
| 68 } | 73 } |
| 69 virtual void Show(); | 74 virtual void Show(); |
| 70 virtual void Hide(bool animate); | 75 virtual void Hide(bool animate); |
| 71 virtual void SetFocusAndSelection(); | 76 virtual void SetFocusAndSelection(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // closed. | 158 // closed. |
| 154 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; | 159 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; |
| 155 | 160 |
| 156 // A pointer back to the owning controller. | 161 // A pointer back to the owning controller. |
| 157 FindBarController* find_bar_controller_; | 162 FindBarController* find_bar_controller_; |
| 158 | 163 |
| 159 DISALLOW_COPY_AND_ASSIGN(FindBarWin); | 164 DISALLOW_COPY_AND_ASSIGN(FindBarWin); |
| 160 }; | 165 }; |
| 161 | 166 |
| 162 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ | 167 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ |
| OLD | NEW |