Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: chrome/browser/ui/views/find_bar_host.h

Issue 2078953003: Remove find bar focus redirection on mouse events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tap testing; make test more rigorous. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/ui/find_bar/find_bar.h" 10 #include "chrome/browser/ui/find_bar/find_bar.h"
11 #include "chrome/browser/ui/views/dropdown_bar_host.h" 11 #include "chrome/browser/ui/views/dropdown_bar_host.h"
12 #include "chrome/browser/ui/views/find_bar_view.h" 12 #include "chrome/browser/ui/views/find_bar_view.h"
13 #include "ui/gfx/geometry/rect.h" 13 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 #include "ui/views/controls/textfield/textfield.h" 15 #include "ui/views/controls/textfield/textfield.h"
16 16
17 class BrowserView; 17 class BrowserView;
18 class FindBarController; 18 class FindBarController;
19 class FindInPageTest;
19 class FindNotificationDetails; 20 class FindNotificationDetails;
20 21
21 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
22 // 23 //
23 // The FindBarHost implements the container widget for the 24 // The FindBarHost implements the container widget for the
24 // find-in-page functionality. It uses the implementation from 25 // find-in-page functionality. It uses the implementation from
25 // find_bar_host_aura.cc to draw its content and is responsible for showing, 26 // find_bar_host_aura.cc to draw its content and is responsible for showing,
26 // hiding, closing, and moving the widget if needed, for example if the widget 27 // hiding, closing, and moving the widget if needed, for example if the widget
27 // is obscuring the selection results. It also receives notifications about the 28 // is obscuring the selection results. It also receives notifications about the
28 // search results and communicates that to the view. 29 // search results and communicates that to the view.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 // Additional accelerator handling (on top of what DropDownBarHost does). 113 // Additional accelerator handling (on top of what DropDownBarHost does).
113 void RegisterAccelerators() override; 114 void RegisterAccelerators() override;
114 void UnregisterAccelerators() override; 115 void UnregisterAccelerators() override;
115 116
116 protected: 117 protected:
117 // Overridden from DropdownBarHost: 118 // Overridden from DropdownBarHost:
118 void OnVisibilityChanged() override; 119 void OnVisibilityChanged() override;
119 120
120 private: 121 private:
122 friend class FindInPageTest;
123
121 // Allows implementation to tweak widget position. 124 // Allows implementation to tweak widget position.
122 void GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect); 125 void GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect);
123 126
124 // Returns the FindBarView. 127 // Returns the FindBarView.
125 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); } 128 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); }
126 129
127 // A pointer back to the owning controller. 130 // A pointer back to the owning controller.
128 FindBarController* find_bar_controller_; 131 FindBarController* find_bar_controller_;
129 132
130 DISALLOW_COPY_AND_ASSIGN(FindBarHost); 133 DISALLOW_COPY_AND_ASSIGN(FindBarHost);
131 }; 134 };
132 135
133 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ 136 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698