OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // draw). The polygon is then given to SetWindowRgn which changes | 140 // draw). The polygon is then given to SetWindowRgn which changes |
141 // the window from being a rectangle in shape, to being a rect with | 141 // the window from being a rectangle in shape, to being a rect with |
142 // curved edges. We also check to see if the region should be | 142 // curved edges. We also check to see if the region should be |
143 // truncated to prevent from drawing onto Chrome's window border. | 143 // truncated to prevent from drawing onto Chrome's window border. |
144 void UpdateWindowEdges(const gfx::Rect& new_pos); | 144 void UpdateWindowEdges(const gfx::Rect& new_pos); |
145 | 145 |
146 // Allows implementation to tweak widget position. | 146 // Allows implementation to tweak widget position. |
147 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); | 147 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); |
148 | 148 |
149 // Returns a keyboard event suitable for forwarding. | 149 // Returns a keyboard event suitable for forwarding. |
150 NativeWebKeyboardEvent GetKeyboardEvent( | 150 content::NativeWebKeyboardEvent GetKeyboardEvent( |
151 const content::WebContents* contents, | 151 const content::WebContents* contents, |
152 const views::KeyEvent& key_event); | 152 const views::KeyEvent& key_event); |
153 | 153 |
154 // Returns the animation for the dropdown. | 154 // Returns the animation for the dropdown. |
155 ui::SlideAnimation* animation() { | 155 ui::SlideAnimation* animation() { |
156 return animation_.get(); | 156 return animation_.get(); |
157 } | 157 } |
158 | 158 |
159 private: | 159 private: |
160 // The BrowserView that created us. | 160 // The BrowserView that created us. |
(...skipping 26 matching lines...) Expand all Loading... |
187 scoped_ptr<views::Widget> host_; | 187 scoped_ptr<views::Widget> host_; |
188 | 188 |
189 // A flag to manually manage visibility. GTK/X11 is asynchronous and | 189 // A flag to manually manage visibility. GTK/X11 is asynchronous and |
190 // the state of the widget can be out of sync. | 190 // the state of the widget can be out of sync. |
191 bool is_visible_; | 191 bool is_visible_; |
192 | 192 |
193 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); | 193 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); |
194 }; | 194 }; |
195 | 195 |
196 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 196 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ |
OLD | NEW |