#ifndef UI_APP_LIST_SEARCH_BOX_MODEL_H_
#define UI_APP_LIST_SEARCH_BOX_MODEL_H_
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "base/strings/string16.h"
#include "ui/app_list/app_list_export.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/selection_model.h"
namespace app_list {
class SearchBoxModelObserver;
class APP_LIST_EXPORT SearchBoxModel {
 public:
  
  struct APP_LIST_EXPORT SpeechButtonProperty {
    SpeechButtonProperty(const gfx::ImageSkia& on_icon,
                         const base::string16& on_tooltip,
                         const gfx::ImageSkia& off_icon,
                         const base::string16& off_tooltip);
    ~SpeechButtonProperty();
    
    gfx::ImageSkia on_icon;
    base::string16 on_tooltip;
    
    gfx::ImageSkia off_icon;
    base::string16 off_tooltip;
  };
  SearchBoxModel();
  ~SearchBoxModel();
  
  void SetIcon(const gfx::ImageSkia& icon);
  const gfx::ImageSkia& icon() const { return icon_; }
  
  void SetSpeechRecognitionButton(
      scoped_ptr<SpeechButtonProperty> speech_button);
  const SpeechButtonProperty* speech_button() const {
    return speech_button_.get();
  }
  
  void SetHintText(const base::string16& hint_text);
  const base::string16& hint_text() const { return hint_text_; }
  
  void SetSelectionModel(const gfx::SelectionModel& sel);
  const gfx::SelectionModel& selection_model() const {
    return selection_model_;
  }
  
  void SetText(const base::string16& text);
  const base::string16& text() const { return text_; }
  void AddObserver(SearchBoxModelObserver* observer);
  void RemoveObserver(SearchBoxModelObserver* observer);
 private:
  gfx::ImageSkia icon_;
  scoped_ptr<SpeechButtonProperty> speech_button_;
  base::string16 hint_text_;
  gfx::SelectionModel selection_model_;
  base::string16 text_;
  ObserverList<SearchBoxModelObserver> observers_;
  DISALLOW_COPY_AND_ASSIGN(SearchBoxModel);
};
}  
#endif