#include <string>
#include "ui/app_list/search_box_model_observer.h"
+#include "ui/app_list/speech_ui_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"
class AppListMenuViews;
class AppListModel;
class AppListViewDelegate;
-class ContentsView;
class SearchBoxModel;
class SearchBoxViewDelegate;
// model that controls what icon to display, what placeholder text to use for
// Textfield. The text and selection model part could be set to change the
// contents and selection model of the Textfield.
-class SearchBoxView : public views::View,
- public views::TextfieldController,
- public views::ButtonListener,
- public views::MenuButtonListener,
- public SearchBoxModelObserver {
+class APP_LIST_EXPORT SearchBoxView : public views::View,
+ public views::TextfieldController,
+ public views::ButtonListener,
+ public views::MenuButtonListener,
+ public SearchBoxModelObserver,
+ public SpeechUIModelObserver {
public:
SearchBoxView(SearchBoxViewDelegate* delegate,
AppListViewDelegate* view_delegate);
views::Textfield* search_box() { return search_box_; }
- void set_contents_view(ContentsView* contents_view) {
+ void set_contents_view(views::View* contents_view) {
contents_view_ = contents_view;
}
virtual void SelectionModelChanged() OVERRIDE;
virtual void TextChanged() OVERRIDE;
+ // Overridden from SpeechUIModelObserver:
+ virtual void OnSpeechRecognitionStateChanged(
+ SpeechRecognitionState new_state) OVERRIDE;
+
SearchBoxViewDelegate* delegate_; // Not owned.
AppListViewDelegate* view_delegate_; // Not owned.
AppListModel* model_; // Owned by the profile-keyed service.
views::ImageButton* speech_button_; // Owned by views hierarchy.
views::MenuButton* menu_button_; // Owned by views hierarchy.
views::Textfield* search_box_; // Owned by views hierarchy.
- ContentsView* contents_view_; // Owned by views hierarchy.
+ views::View* contents_view_; // Owned by views hierarchy.
DISALLOW_COPY_AND_ASSIGN(SearchBoxView);
};