| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138   // Retrieves the boundary that the dropdown widget has to work with | 138   // Retrieves the boundary that the dropdown widget has to work with | 
| 139   // within the Chrome frame window. The boundary differs depending on | 139   // within the Chrome frame window. The boundary differs depending on | 
| 140   // the dropdown bar implementation. The default implementation | 140   // the dropdown bar implementation. The default implementation | 
| 141   // returns the boundary of browser_view and the drop down | 141   // returns the boundary of browser_view and the drop down | 
| 142   // can be shown in any client area. | 142   // can be shown in any client area. | 
| 143   virtual void GetWidgetBounds(gfx::Rect* bounds); | 143   virtual void GetWidgetBounds(gfx::Rect* bounds); | 
| 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. |  | 
| 149   content::NativeWebKeyboardEvent GetKeyboardEvent( |  | 
| 150       const content::WebContents* contents, |  | 
| 151       const ui::KeyEvent& key_event); |  | 
| 152 |  | 
| 153   // Returns the animation for the dropdown. | 148   // Returns the animation for the dropdown. | 
| 154   gfx::SlideAnimation* animation() { | 149   gfx::SlideAnimation* animation() { | 
| 155     return animation_.get(); | 150     return animation_.get(); | 
| 156   } | 151   } | 
| 157 | 152 | 
| 158  private: | 153  private: | 
| 159   // Set the view whose position in the |browser_view_| view hierarchy | 154   // Set the view whose position in the |browser_view_| view hierarchy | 
| 160   // determines the z-order of |host_| relative to views with layers and | 155   // determines the z-order of |host_| relative to views with layers and | 
| 161   // views with associated NativeViews. | 156   // views with associated NativeViews. | 
| 162   void SetHostViewNative(views::View* host_view); | 157   void SetHostViewNative(views::View* host_view); | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 191   scoped_ptr<views::Widget> host_; | 186   scoped_ptr<views::Widget> host_; | 
| 192 | 187 | 
| 193   // A flag to manually manage visibility. GTK/X11 is asynchronous and | 188   // A flag to manually manage visibility. GTK/X11 is asynchronous and | 
| 194   // the state of the widget can be out of sync. | 189   // the state of the widget can be out of sync. | 
| 195   bool is_visible_; | 190   bool is_visible_; | 
| 196 | 191 | 
| 197   DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); | 192   DISALLOW_COPY_AND_ASSIGN(DropdownBarHost); | 
| 198 }; | 193 }; | 
| 199 | 194 | 
| 200 #endif  // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 195 #endif  // CHROME_BROWSER_UI_VIEWS_DROPDOWN_BAR_HOST_H_ | 
| OLD | NEW | 
|---|