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

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

Issue 2848883005: Test FindBar audible alerts. (Closed)
Patch Set: Address Scott's comment. Created 3 years, 7 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
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"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Overridden from ui::AcceleratorTarget in DropdownBarHost class: 71 // Overridden from ui::AcceleratorTarget in DropdownBarHost class:
72 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 72 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
73 bool CanHandleAccelerators() const override; 73 bool CanHandleAccelerators() const override;
74 74
75 // FindBarTesting implementation: 75 // FindBarTesting implementation:
76 bool GetFindBarWindowInfo(gfx::Point* position, bool* fully_visible) override; 76 bool GetFindBarWindowInfo(gfx::Point* position, bool* fully_visible) override;
77 base::string16 GetFindSelectedText() override; 77 base::string16 GetFindSelectedText() override;
78 base::string16 GetMatchCountText() override; 78 base::string16 GetMatchCountText() override;
79 int GetWidth() override; 79 int GetWidth() override;
80 size_t GetAudibleAlertCount() override;
80 81
81 // Overridden from DropdownBarHost: 82 // Overridden from DropdownBarHost:
82 // Returns the rectangle representing where to position the find bar. It uses 83 // Returns the rectangle representing where to position the find bar. It uses
83 // GetDialogBounds and positions itself within that, either to the left (if an 84 // GetDialogBounds and positions itself within that, either to the left (if an
84 // InfoBar is present) or to the right (no InfoBar). If 85 // InfoBar is present) or to the right (no InfoBar). If
85 // |avoid_overlapping_rect| is specified, the return value will be a rectangle 86 // |avoid_overlapping_rect| is specified, the return value will be a rectangle
86 // located immediately to the left of |avoid_overlapping_rect|, as long as 87 // located immediately to the left of |avoid_overlapping_rect|, as long as
87 // there is enough room for the dialog to draw within the bounds. If not, the 88 // there is enough room for the dialog to draw within the bounds. If not, the
88 // dialog position returned will overlap |avoid_overlapping_rect|. 89 // dialog position returned will overlap |avoid_overlapping_rect|.
89 // Note: |avoid_overlapping_rect| is expected to use coordinates relative to 90 // Note: |avoid_overlapping_rect| is expected to use coordinates relative to
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 124
124 // Allows implementation to tweak widget position. 125 // Allows implementation to tweak widget position.
125 void GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect); 126 void GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect);
126 127
127 // Returns the FindBarView. 128 // Returns the FindBarView.
128 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); } 129 FindBarView* find_bar_view() { return static_cast<FindBarView*>(view()); }
129 130
130 // A pointer back to the owning controller. 131 // A pointer back to the owning controller.
131 FindBarController* find_bar_controller_; 132 FindBarController* find_bar_controller_;
132 133
134 // The number of audible alerts issued.
135 size_t audible_alerts_;
136
133 DISALLOW_COPY_AND_ASSIGN(FindBarHost); 137 DISALLOW_COPY_AND_ASSIGN(FindBarHost);
134 }; 138 };
135 139
136 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_ 140 #endif // CHROME_BROWSER_UI_VIEWS_FIND_BAR_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | chrome/browser/ui/views/find_bar_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698