| 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 19 matching lines...) Expand all Loading... |
| 30 namespace views { | 30 namespace views { |
| 31 class ExternalFocusTracker; | 31 class ExternalFocusTracker; |
| 32 class View; | 32 class View; |
| 33 class Widget; | 33 class Widget; |
| 34 } // namespace views | 34 } // namespace views |
| 35 | 35 |
| 36 //////////////////////////////////////////////////////////////////////////////// | 36 //////////////////////////////////////////////////////////////////////////////// |
| 37 // | 37 // |
| 38 // The DropdownBarHost implements the container widget for the UI that | 38 // The DropdownBarHost implements the container widget for the UI that |
| 39 // is shown at the top of browser contents. It uses the appropriate | 39 // is shown at the top of browser contents. It uses the appropriate |
| 40 // implementation from dropdown_bar_host_win.cc or dropdown_bar_host_gtk.cc to | 40 // implementation from dropdown_bar_host_win.cc or dropdown_bar_host_aura.cc to |
| 41 // draw its content and is responsible for showing, hiding, animating, closing, | 41 // draw its content and is responsible for showing, hiding, animating, closing, |
| 42 // and moving the bar if needed, for example if the widget is | 42 // and moving the bar if needed, for example if the widget is |
| 43 // obscuring the selection results in FindBar. | 43 // obscuring the selection results in FindBar. |
| 44 // | 44 // |
| 45 //////////////////////////////////////////////////////////////////////////////// | 45 //////////////////////////////////////////////////////////////////////////////// |
| 46 class DropdownBarHost : public ui::AcceleratorTarget, | 46 class DropdownBarHost : public ui::AcceleratorTarget, |
| 47 public views::FocusChangeListener, | 47 public views::FocusChangeListener, |
| 48 public ui::AnimationDelegate { | 48 public ui::AnimationDelegate { |
| 49 public: | 49 public: |
| 50 explicit DropdownBarHost(BrowserView* browser_view); | 50 explicit DropdownBarHost(BrowserView* browser_view); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |