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

Unified Diff: ui/app_list/views/search_box_view.h

Issue 69813002: Adds the speech recognition button to the app-list searchbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: ui/app_list/views/search_box_view.h
diff --git a/ui/app_list/views/search_box_view.h b/ui/app_list/views/search_box_view.h
index c06990262a57c9fb93d8f992647d5aba7ab6c224..5274dbc7f431c70976496351fec3e077c06b9889 100644
--- a/ui/app_list/views/search_box_view.h
+++ b/ui/app_list/views/search_box_view.h
@@ -8,6 +8,7 @@
#include <string>
#include "ui/app_list/search_box_model_observer.h"
+#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/menu_button_listener.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/view.h"
@@ -32,6 +33,7 @@ class SearchBoxViewDelegate;
// contents and selection model of the Textfield.
class SearchBoxView : public views::View,
public views::TextfieldController,
+ public views::ButtonListener,
public views::MenuButtonListener,
public SearchBoxModelObserver {
public:
@@ -68,12 +70,18 @@ class SearchBoxView : public views::View,
virtual bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& key_event) OVERRIDE;
+ // Overridden from views::ButtonListener:
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
// Overridden from views::MenuButtonListener:
virtual void OnMenuButtonClicked(View* source,
const gfx::Point& point) OVERRIDE;
// Overridden from SearchBoxModelObserver:
virtual void IconChanged() OVERRIDE;
+ virtual void RightButtonPropChanged() OVERRIDE;
+ virtual void RightButtonStateChanged(bool toggled) OVERRIDE;
virtual void HintTextChanged() OVERRIDE;
virtual void SelectionModelChanged() OVERRIDE;
virtual void TextChanged() OVERRIDE;
@@ -85,6 +93,7 @@ class SearchBoxView : public views::View,
scoped_ptr<AppListMenuViews> menu_;
views::ImageView* icon_view_; // Owned by views hierarchy.
+ views::ToggleImageButton* right_button_; // Owned by views hierarchy.
views::MenuButton* menu_button_; // Owned by views hierarchy.
views::Textfield* search_box_; // Owned by views hierarchy.
views::View* contents_view_; // Owned by views hierarchy.

Powered by Google App Engine
This is Rietveld 408576698