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 | 62 // Forwards selected keystrokes to the renderer. This is useful to make sure |
63 // arrow keys and PageUp and PageDown result in scrolling, instead of | 63 // that arrow keys and PageUp and PageDown result in scrolling, instead of |
64 // being eaten because the FindBar has focus. | 64 // being eaten because the FindBar has focus. Returns true if the keystroke |
65 void ForwardKeystrokeToWebpage(TCHAR key); | 65 // was forwarded, false if not. |
| 66 bool MaybeForwardKeystrokeToWebpage(UINT message, TCHAR key, UINT flags); |
66 | 67 |
67 // FindBar implementation: | 68 // FindBar implementation: |
68 virtual FindBarController* GetFindBarController() const { | 69 virtual FindBarController* GetFindBarController() const { |
69 return find_bar_controller_; | 70 return find_bar_controller_; |
70 } | 71 } |
71 virtual void SetFindBarController(FindBarController* find_bar_controller) { | 72 virtual void SetFindBarController(FindBarController* find_bar_controller) { |
72 find_bar_controller_ = find_bar_controller; | 73 find_bar_controller_ = find_bar_controller; |
73 } | 74 } |
74 virtual void Show(); | 75 virtual void Show(); |
75 virtual void Hide(bool animate); | 76 virtual void Hide(bool animate); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // closed. | 159 // closed. |
159 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; | 160 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; |
160 | 161 |
161 // A pointer back to the owning controller. | 162 // A pointer back to the owning controller. |
162 FindBarController* find_bar_controller_; | 163 FindBarController* find_bar_controller_; |
163 | 164 |
164 DISALLOW_COPY_AND_ASSIGN(FindBarWin); | 165 DISALLOW_COPY_AND_ASSIGN(FindBarWin); |
165 }; | 166 }; |
166 | 167 |
167 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ | 168 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_WIN_H_ |
OLD | NEW |