| Index: ash/app_list/search_box_view.h
|
| diff --git a/ash/app_list/search_box_view.h b/ash/app_list/search_box_view.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f2634a9a315cf1b9de58c0228bca098356775b5d
|
| --- /dev/null
|
| +++ b/ash/app_list/search_box_view.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ASH_APP_LIST_SEARCH_BOX_VIEW_H_
|
| +#define ASH_APP_LIST_SEARCH_BOX_VIEW_H_
|
| +#pragma once
|
| +
|
| +#include "base/timer.h"
|
| +#include "ui/views/view.h"
|
| +#include "ui/views/controls/textfield/textfield_controller.h"
|
| +
|
| +namespace views {
|
| +class ImageView;
|
| +class Textfield;
|
| +} // namespace views
|
| +
|
| +namespace ash {
|
| +
|
| +class SearchBoxView : public views::View,
|
| + public views::TextfieldController {
|
| + public:
|
| + SearchBoxView();
|
| +
|
| + views::Textfield* search_box() const {
|
| + return search_box_;
|
| + }
|
| +
|
| + std::string search_text() const;
|
| +
|
| + private:
|
| + // Overridden from views::View:
|
| + virtual void Layout() OVERRIDE;
|
| +
|
| + // Overridden from views::TextfieldController:
|
| + virtual void ContentsChanged(views::Textfield* sender,
|
| + const string16& new_contents) OVERRIDE;
|
| + virtual bool HandleKeyEvent(views::Textfield* sender,
|
| + const views::KeyEvent& key_event) OVERRIDE;
|
| +
|
| + views::ImageView* white_search_;
|
| + views::Textfield* search_box_;
|
| +
|
| + base::OneShotTimer<SearchBoxView> query_timer_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SearchBoxView);
|
| +};
|
| +
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_APP_LIST_SEARCH_BOX_VIEW_H_
|
|
|