| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/animation_delegate.h" | 9 #include "app/animation_delegate.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Creates and returns the native Widget. | 136 // Creates and returns the native Widget. |
| 137 views::Widget* CreateHost(); | 137 views::Widget* CreateHost(); |
| 138 | 138 |
| 139 // Allows implementation to tweak widget position. | 139 // Allows implementation to tweak widget position. |
| 140 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); | 140 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); |
| 141 | 141 |
| 142 // Returns a keyboard event suitable for forwarding. | 142 // Returns a keyboard event suitable for forwarding. |
| 143 NativeWebKeyboardEvent GetKeyboardEvent( | 143 NativeWebKeyboardEvent GetKeyboardEvent( |
| 144 const TabContents* contents, | 144 const TabContents* contents, |
| 145 const views::Textfield::Keystroke& key_stroke); | 145 const views::KeyEvent& key_event); |
| 146 | 146 |
| 147 // Returns the animation for the dropdown. | 147 // Returns the animation for the dropdown. |
| 148 SlideAnimation* animation() { | 148 SlideAnimation* animation() { |
| 149 return animation_.get(); | 149 return animation_.get(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 // The BrowserView that created us. | 153 // The BrowserView that created us. |
| 154 BrowserView* browser_view_; | 154 BrowserView* browser_view_; |
| 155 | 155 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 179 scoped_ptr<views::Widget> host_; | 179 scoped_ptr<views::Widget> host_; |
| 180 | 180 |
| 181 // A flag to manually manage visibility. GTK/X11 is asynchronous and | 181 // A flag to manually manage visibility. GTK/X11 is asynchronous and |
| 182 // the state of the widget can be out of sync. | 182 // the state of the widget can be out of sync. |
| 183 bool is_visible_; | 183 bool is_visible_; |
| 184 | 184 |
| 185 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); | 185 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 188 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ |
| OLD | NEW |