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

Side by Side Diff: mandoline/ui/desktop_ui/find_bar_view.h

Issue 1371773003: mandoline: Add find in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT to fix patch failure. Created 5 years, 2 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MANDOLINE_UI_DESKTOP_UI_FIND_BAR_VIEW_H_
6 #define MANDOLINE_UI_DESKTOP_UI_FIND_BAR_VIEW_H_
7
8 #include "ui/views/view.h"
9 #include "ui/views/controls/button/label_button.h"
10 #include "ui/views/controls/textfield/textfield_controller.h"
11
12 namespace views {
13 class BoxLayout;
14 class Label;
15 class Textfield;
16 }
17
18 namespace mandoline {
19
20 class FindBarDelegate;
21
22 // Owns the widgets which show the find bar.
23 class FindBarView : public views::View,
24 public views::TextfieldController,
25 public views::ButtonListener {
26 public:
27 FindBarView(FindBarDelegate* delegate);
28 ~FindBarView() override;
29
30 void Show();
31 void Hide();
32
33 void SetMatchLabel(int result, int total);
34
35 private:
36 // Overridden from views::TextfieldController:
37 void ContentsChanged(views::Textfield* sender,
38 const base::string16& new_contents) override;
39
40 // Overridden from views::ButtonListener:
41 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
42
43 FindBarDelegate* delegate_;
44
45 views::BoxLayout* layout_;
46 views::Textfield* text_field_;
47 views::Label* match_count_label_;
48 views::LabelButton* close_button_;
49
50 DISALLOW_COPY_AND_ASSIGN(FindBarView);
51 };
52
53 } // namespace mandoline
54
55 #endif // MANDOLINE_UI_DESKTOP_UI_FIND_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698