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_HOST_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FIND_BAR_HOST_H_ |
6 #define CHROME_BROWSER_VIEWS_FIND_BAR_HOST_H_ | 6 #define CHROME_BROWSER_VIEWS_FIND_BAR_HOST_H_ |
7 | 7 |
8 #include "app/animation.h" | 8 #include "app/animation.h" |
9 #include "app/gfx/native_widget_types.h" | 9 #include "app/gfx/native_widget_types.h" |
10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 void GetDialogBounds(gfx::Rect* bounds); | 125 void GetDialogBounds(gfx::Rect* bounds); |
126 | 126 |
127 // The dialog needs rounded edges, so we create a polygon that corresponds to | 127 // The dialog needs rounded edges, so we create a polygon that corresponds to |
128 // the background images for this window (and make the polygon only contain | 128 // the background images for this window (and make the polygon only contain |
129 // the pixels that we want to draw). The polygon is then given to SetWindowRgn | 129 // the pixels that we want to draw). The polygon is then given to SetWindowRgn |
130 // which changes the window from being a rectangle in shape, to being a rect | 130 // which changes the window from being a rectangle in shape, to being a rect |
131 // with curved edges. We also check to see if the region should be truncated | 131 // with curved edges. We also check to see if the region should be truncated |
132 // to prevent from drawing onto Chrome's window border. | 132 // to prevent from drawing onto Chrome's window border. |
133 void UpdateWindowEdges(const gfx::Rect& new_pos); | 133 void UpdateWindowEdges(const gfx::Rect& new_pos); |
134 | 134 |
135 | |
136 // Registers this class as the handler for when Escape is pressed. We will | 135 // Registers this class as the handler for when Escape is pressed. We will |
137 // unregister once we loose focus. See also: SetFocusChangeListener(). | 136 // unregister once we loose focus. See also: SetFocusChangeListener(). |
138 void RegisterEscAccelerator(); | 137 void RegisterEscAccelerator(); |
139 | 138 |
140 // When we loose focus, we unregister the handler for Escape. See | 139 // When we loose focus, we unregister the handler for Escape. See |
141 // also: SetFocusChangeListener(). | 140 // also: SetFocusChangeListener(). |
142 void UnregisterEscAccelerator(); | 141 void UnregisterEscAccelerator(); |
143 | 142 |
144 // Creates and returns the native Widget. | 143 // Creates and returns the native Widget. |
145 views::Widget* CreateHost(); | 144 views::Widget* CreateHost(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 FindBarController* find_bar_controller_; | 183 FindBarController* find_bar_controller_; |
185 | 184 |
186 // Host is the Widget implementation that is created and maintained by the | 185 // Host is the Widget implementation that is created and maintained by the |
187 // find bar. It contains the FindBarView. | 186 // find bar. It contains the FindBarView. |
188 scoped_ptr<views::Widget> host_; | 187 scoped_ptr<views::Widget> host_; |
189 | 188 |
190 DISALLOW_COPY_AND_ASSIGN(FindBarHost); | 189 DISALLOW_COPY_AND_ASSIGN(FindBarHost); |
191 }; | 190 }; |
192 | 191 |
193 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_HOST_H_ | 192 #endif // CHROME_BROWSER_VIEWS_FIND_BAR_HOST_H_ |
OLD | NEW |