Workaround for xkbcommon dead keys.
[chromium-blink-merge.git] / ui / app_list / views / search_result_page_view.h
blob42d9054abb376c084b68d8505f74109360cfbe1e
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_
6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "ui/app_list/app_list_export.h"
13 #include "ui/app_list/app_list_model.h"
14 #include "ui/views/view.h"
16 namespace app_list {
18 class AppListMainView;
19 class AppListViewDelegate;
20 class SearchResultContainerView;
22 // The start page for the experimental app list.
23 class APP_LIST_EXPORT SearchResultPageView : public views::View {
24 public:
25 SearchResultPageView();
26 ~SearchResultPageView() override;
28 int selected_index() { return selected_index_; }
30 void AddSearchResultContainerView(
31 AppListModel::SearchResults* result_model,
32 SearchResultContainerView* result_container);
34 // Overridden from views::View:
35 bool OnKeyPressed(const ui::KeyEvent& event) override;
36 void ChildPreferredSizeChanged(views::View* child) override;
38 private:
39 void SetSelectedIndex(int index);
40 bool IsValidSelectionIndex(int index);
42 // The SearchResultContainerViews that compose the search page. All owned by
43 // the views hierarchy.
44 std::vector<SearchResultContainerView*> result_container_views_;
46 int selected_index_;
48 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView);
51 } // namespace app_list
53 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_