| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FIND_BAR_HOST_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/ui/find_bar/find_bar.h" | 9 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 10 #include "chrome/browser/ui/views/dropdown_bar_host.h" | 10 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 11 #include "chrome/browser/ui/views/find_bar_view.h" | 11 #include "chrome/browser/ui/views/find_bar_view.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
| 14 #include "ui/views/controls/textfield/textfield.h" | 14 #include "ui/views/controls/textfield/textfield.h" |
| 15 | 15 |
| 16 class BrowserView; | 16 class BrowserView; |
| 17 class FindBarController; | 17 class FindBarController; |
| 18 class FindNotificationDetails; | 18 class FindNotificationDetails; |
| 19 | 19 |
| 20 //////////////////////////////////////////////////////////////////////////////// | 20 //////////////////////////////////////////////////////////////////////////////// |
| 21 // | 21 // |
| 22 // The FindBarHost implements the container widget for the | 22 // The FindBarHost implements the container widget for the |
| 23 // find-in-page functionality. It uses the appropriate implementation from | 23 // find-in-page functionality. It uses the implementation from |
| 24 // find_bar_host_win.cc or find_bar_host_aura.cc to draw its content and is | 24 // find_bar_host_aura.cc to draw its content and is responsible for showing, |
| 25 // responsible for showing, hiding, closing, and moving the widget if needed, | 25 // hiding, closing, and moving the widget if needed, for example if the widget |
| 26 // for example if the widget is obscuring the selection results. It also | 26 // is obscuring the selection results. It also receives notifications about the |
| 27 // receives notifications about the search results and communicates that to | 27 // search results and communicates that to the view. |
| 28 // the view. | |
| 29 // | 28 // |
| 30 // There is one FindBarHost per BrowserView, and its state is updated | 29 // There is one FindBarHost per BrowserView, and its state is updated |
| 31 // whenever the selected Tab is changed. The FindBarHost is created when | 30 // whenever the selected Tab is changed. The FindBarHost is created when |
| 32 // the BrowserView is attached to the frame's Widget for the first time. | 31 // the BrowserView is attached to the frame's Widget for the first time. |
| 33 // | 32 // |
| 34 //////////////////////////////////////////////////////////////////////////////// | 33 //////////////////////////////////////////////////////////////////////////////// |
| 35 class FindBarHost : public DropdownBarHost, | 34 class FindBarHost : public DropdownBarHost, |
| 36 public FindBar, | 35 public FindBar, |
| 37 public FindBarTesting { | 36 public FindBarTesting { |
| 38 public: | 37 public: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Returns the FindBarView. | 133 // Returns the FindBarView. |
| 135 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); } | 134 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); } |
| 136 | 135 |
| 137 // A pointer back to the owning controller. | 136 // A pointer back to the owning controller. |
| 138 FindBarController* find_bar_controller_; | 137 FindBarController* find_bar_controller_; |
| 139 | 138 |
| 140 DISALLOW_COPY_AND_ASSIGN(FindBarHost); | 139 DISALLOW_COPY_AND_ASSIGN(FindBarHost); |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ | 142 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ |
| OLD | NEW |