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

Unified Diff: chrome/browser/ui/views/find_bar_view.h

Issue 1270783005: V1 of material design find in page bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: suffixual f Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88172d8bea5a95f672a4aa258df90f5acac67cf2..5fac1d1955d17a8777b4600d811d897d6cd75999 100644
--- a/chrome/browser/ui/views/find_bar_view.h
+++ b/chrome/browser/ui/views/find_bar_view.h
@@ -12,6 +12,7 @@
#include "ui/views/controls/button/button.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;
@@ -32,7 +33,8 @@ class Painter;
////////////////////////////////////////////////////////////////////////////////
class FindBarView : public DropdownBarView,
public views::ButtonListener,
- public views::TextfieldController {
+ public views::TextfieldController,
+ public views::ViewTargeterDelegate {
public:
// A tag denoting which button the user pressed.
enum ButtonTag {
@@ -69,6 +71,7 @@ class FindBarView : public DropdownBarView,
// DropdownBarView:
void OnPaint(gfx::Canvas* canvas) override;
+ void OnPaintBackground(gfx::Canvas* canvas) override;
void Layout() override;
gfx::Size GetPreferredSize() const override;
@@ -81,7 +84,15 @@ class FindBarView : public DropdownBarView,
void OnAfterUserAction(views::Textfield* sender) override;
void OnAfterPaste() override;
+ // views::ViewTargeterDelegate:
+ 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);
@@ -91,6 +102,7 @@ class FindBarView : public DropdownBarView,
// DropdownBarView:
const char* GetClassName() const override;
void OnThemeChanged() override;
+ void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
// 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
@@ -124,7 +136,7 @@ class FindBarView : public DropdownBarView,
views::Textfield* find_text_;
scoped_ptr<views::Painter> find_text_border_;
views::Label* match_count_text_;
- FocusForwarderView* focus_forwarder_view_;
+ views::View* focus_forwarder_view_;
views::ImageButton* find_previous_button_;
views::ImageButton* find_next_button_;
views::ImageButton* close_button_;
« 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