| Index: chrome/browser/ui/views/find_bar_view.h
|
| diff --git a/chrome/browser/ui/views/find_bar_view.h b/chrome/browser/ui/views/find_bar_view.h
|
| index 97787bfd78fe828d3015a17e2589a7272a0ca11f..2d5240497fd49312239cf781e9fec3629a9fd90b 100644
|
| --- a/chrome/browser/ui/views/find_bar_view.h
|
| +++ b/chrome/browser/ui/views/find_bar_view.h
|
| @@ -12,19 +12,23 @@
|
| #include "base/strings/string16.h"
|
| #include "chrome/browser/ui/views/dropdown_bar_view.h"
|
| #include "ui/views/controls/button/vector_icon_button_delegate.h"
|
| -#include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/controls/textfield/textfield_controller.h"
|
| #include "ui/views/view_targeter_delegate.h"
|
|
|
| class FindBarHost;
|
| class FindNotificationDetails;
|
|
|
| +namespace gfx {
|
| +class Range;
|
| +}
|
| +
|
| namespace views {
|
| -class ImageButton;
|
| class Label;
|
| class MouseEvent;
|
| class Painter;
|
| class Separator;
|
| +class Textfield;
|
| +class VectorIconButton;
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -66,7 +70,6 @@ class FindBarView : public DropdownBarView,
|
| void SetFocusAndSelection(bool select_all) override;
|
|
|
| // DropdownBarView:
|
| - void OnPaint(gfx::Canvas* canvas) override;
|
| void OnPaintBackground(gfx::Canvas* canvas) override;
|
| void Layout() override;
|
| gfx::Size GetPreferredSize() const override;
|
| @@ -85,11 +88,6 @@ class FindBarView : public DropdownBarView,
|
| views::View* TargetForRect(View* root, const gfx::Rect& rect) override;
|
|
|
| private:
|
| - // Does mode-specific init. The NonMaterial version should eventually be
|
| - // removed in favor of Material.
|
| - void InitViewsForNonMaterial();
|
| - void InitViewsForMaterial();
|
| -
|
| // Starts finding |search_text|. If the text is empty, stops finding.
|
| void Find(const base::string16& search_text);
|
|
|
| @@ -98,32 +96,11 @@ class FindBarView : public DropdownBarView,
|
|
|
| // DropdownBarView:
|
| const char* GetClassName() const override;
|
| - void OnThemeChanged() override;
|
| void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
|
|
|
| // Returns the color for the icons on the buttons per the current NativeTheme.
|
| SkColor GetTextColorForIcon();
|
|
|
| - // We use a hidden view to grab mouse clicks and bring focus to the find
|
| - // text box. This is because although the find text box may look like it
|
| - // extends all the way to the find button, it only goes as far as to the
|
| - // match_count label. The user, however, expects being able to click anywhere
|
| - // inside what looks like the find text box (including on or around the
|
| - // match_count label) and have focus brought to the find box.
|
| - class FocusForwarderView : public views::View {
|
| - public:
|
| - explicit FocusForwarderView(
|
| - views::Textfield* view_to_focus_on_mousedown)
|
| - : view_to_focus_on_mousedown_(view_to_focus_on_mousedown) {}
|
| -
|
| - private:
|
| - bool OnMousePressed(const ui::MouseEvent& event) override;
|
| -
|
| - views::Textfield* view_to_focus_on_mousedown_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(FocusForwarderView);
|
| - };
|
| -
|
| // Returns the OS-specific view for the find bar that acts as an intermediary
|
| // between us and the WebContentsView.
|
| FindBarHost* find_bar_host() const;
|
| @@ -138,9 +115,9 @@ class FindBarView : public DropdownBarView,
|
| views::Label* match_count_text_;
|
| views::View* focus_forwarder_view_;
|
| views::Separator* separator_;
|
| - views::ImageButton* find_previous_button_;
|
| - views::ImageButton* find_next_button_;
|
| - views::ImageButton* close_button_;
|
| + views::VectorIconButton* find_previous_button_;
|
| + views::VectorIconButton* find_next_button_;
|
| + views::VectorIconButton* close_button_;
|
|
|
| // The preferred height of the find bar.
|
| int preferred_height_;
|
|
|