| 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" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 virtual void UnregisterAccelerators() override; | 120 virtual void UnregisterAccelerators() override; |
| 121 | 121 |
| 122 protected: | 122 protected: |
| 123 // Overridden from DropdownBarHost: | 123 // Overridden from DropdownBarHost: |
| 124 virtual void OnVisibilityChanged() override; | 124 virtual void OnVisibilityChanged() override; |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 // Allows implementation to tweak widget position. | 127 // Allows implementation to tweak widget position. |
| 128 void GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect); | 128 void GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect); |
| 129 | 129 |
| 130 // Allows native implementation to prevent key events from being forwarded. | |
| 131 bool ShouldForwardKeyEventToWebpageNative(const ui::KeyEvent& key_event); | |
| 132 | |
| 133 // Returns the FindBarView. | 130 // Returns the FindBarView. |
| 134 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); } | 131 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); } |
| 135 | 132 |
| 136 // A pointer back to the owning controller. | 133 // A pointer back to the owning controller. |
| 137 FindBarController* find_bar_controller_; | 134 FindBarController* find_bar_controller_; |
| 138 | 135 |
| 139 DISALLOW_COPY_AND_ASSIGN(FindBarHost); | 136 DISALLOW_COPY_AND_ASSIGN(FindBarHost); |
| 140 }; | 137 }; |
| 141 | 138 |
| 142 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ | 139 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ |
| OLD | NEW |