| 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 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // curved edges. We also check to see if the region should be | 141 // curved edges. We also check to see if the region should be |
| 142 // truncated to prevent from drawing onto Chrome's window border. | 142 // truncated to prevent from drawing onto Chrome's window border. |
| 143 void UpdateWindowEdges(const gfx::Rect& new_pos); | 143 void UpdateWindowEdges(const gfx::Rect& new_pos); |
| 144 | 144 |
| 145 // Allows implementation to tweak widget position. | 145 // Allows implementation to tweak widget position. |
| 146 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); | 146 void SetWidgetPositionNative(const gfx::Rect& new_pos, bool no_redraw); |
| 147 | 147 |
| 148 // Returns a keyboard event suitable for forwarding. | 148 // Returns a keyboard event suitable for forwarding. |
| 149 content::NativeWebKeyboardEvent GetKeyboardEvent( | 149 content::NativeWebKeyboardEvent GetKeyboardEvent( |
| 150 const content::WebContents* contents, | 150 const content::WebContents* contents, |
| 151 const views::KeyEvent& key_event); | 151 const ui::KeyEvent& key_event); |
| 152 | 152 |
| 153 // Returns the animation for the dropdown. | 153 // Returns the animation for the dropdown. |
| 154 ui::SlideAnimation* animation() { | 154 ui::SlideAnimation* animation() { |
| 155 return animation_.get(); | 155 return animation_.get(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 // The BrowserView that created us. | 159 // The BrowserView that created us. |
| 160 BrowserView* browser_view_; | 160 BrowserView* browser_view_; |
| 161 | 161 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 186 scoped_ptr<views::Widget> host_; | 186 scoped_ptr<views::Widget> host_; |
| 187 | 187 |
| 188 // A flag to manually manage visibility. GTK/X11 is asynchronous and | 188 // A flag to manually manage visibility. GTK/X11 is asynchronous and |
| 189 // the state of the widget can be out of sync. | 189 // the state of the widget can be out of sync. |
| 190 bool is_visible_; | 190 bool is_visible_; |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); | 192 DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 195 #endif // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ |
| OLD | NEW |