diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 00:16:17 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 00:16:17 +0000 |
commit | ef59e6c4064973e58c923fbcfb51e68911cff8d8 (patch) | |
tree | 74b264a7a69765dc3c9b716b4f4b969612ec63e8 /ui/app_list/search_box_model_observer.h | |
parent | 38ddaff588d764ac6a92ec1e8b6766732ba92efd (diff) | |
download | chromium_src-ef59e6c4064973e58c923fbcfb51e68911cff8d8.zip chromium_src-ef59e6c4064973e58c923fbcfb51e68911cff8d8.tar.gz chromium_src-ef59e6c4064973e58c923fbcfb51e68911cff8d8.tar.bz2 |
app_list: Add search box and search result view for v2.
- Add a SearchBoxModel that represents search box's icon, placeholder text,
user typed text and selection model (current selection and cursor position);
- Add a SearchBoxView that displays SearchBoxModel and observes SearchBoxModel
changes via SearchBoxModelObserver;
When user typed/changed text in search box, the view also fires query changed
notification to its SearchBoxViewDelegate;
- Add a SearchResult that carries an icon, two tagged texts;
- Add a SearchResultView that displays a SearchResult;
- Change AppListModel to be a master model that has three sub models:
apps list, search box and search results;
- Add a SearchResultListView that display search results sub model of
AppListModel using a list of SeachResultView;
The view supports up/down key navigation and when user selects a result
via mouse click or enter key, it asks its SearchResultListViewDelegate to
OpenResult;
- Update AppListViewDelegate:
- Add new methods: StartSearch, StopSearch and OpenResult;
- Deleted no-longer needed UpdateModel method;
- Rename OnAppListItemActivated -> ActivateAppListItem;
- Update ash_shell's app_list to support a simple substr match search;
- Add a SearchBuilder that implements the search via AutoCompleteController;
- Other changes:
- Rename AppListModelBuilder -> AppsModelBuilder;
- Rename AppListModelView -> AppsGridView;
BUG=125964
TEST=Manual. In ash_shell, it searches the 5 example apps. In ash/chrome, it should show similar results as omnibox.
Review URL: https://chromiumcodereview.appspot.com/10386224
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list/search_box_model_observer.h')
-rw-r--r-- | ui/app_list/search_box_model_observer.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui/app_list/search_box_model_observer.h b/ui/app_list/search_box_model_observer.h new file mode 100644 index 0000000..0393ade --- /dev/null +++ b/ui/app_list/search_box_model_observer.h @@ -0,0 +1,33 @@ +// 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 UI_APP_LIST_SEARCH_BOX_MODEL_OBSERVER_H_ +#define UI_APP_LIST_SEARCH_BOX_MODEL_OBSERVER_H_ +#pragma once + +#include "ui/app_list/app_list_export.h" + +namespace app_list { + +class APP_LIST_EXPORT SearchBoxModelObserver { + public: + // Invoked when icon is changed. + virtual void IconChanged() = 0; + + // Invoked when hint text is changed. + virtual void HintTextChanged() = 0; + + // Invoked when selection model is changed. + virtual void SelectionModelChanged() = 0; + + // Invoked when text is changed. + virtual void TextChanged() = 0; + + protected: + virtual ~SearchBoxModelObserver() {} +}; + +} // namespace app_list + +#endif // UI_APP_LIST_SEARCH_BOX_MODEL_OBSERVER_H_ |