Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: ui/app_list/views/search_result_answer_card_view.h

Issue 2905523004: Making answer card to behave like other results. (Closed)
Patch Set: Fixing build breakage. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/search_result_answer_card_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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.
4
5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_ANSWER_CARD_VIEW_H_
6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_ANSWER_CARD_VIEW_H_
7
8 #include "ui/app_list/app_list_model_observer.h"
9 #include "ui/app_list/views/search_result_container_view.h"
10
11 namespace app_list {
12
13 class AppListModel;
14 class SearchResultPageView;
15
16 // Result container for the search answer card.
17 class APP_LIST_EXPORT SearchResultAnswerCardView
18 : public SearchResultContainerView,
19 public AppListModelObserver {
20 public:
21 SearchResultAnswerCardView(AppListModel* model,
22 SearchResultPageView* search_results_page_view,
23 views::View* search_answer_view);
24 ~SearchResultAnswerCardView() override;
25
26 private:
27 class SearchAnswerContainerView;
28
29 // Overridden from views::View:
30 const char* GetClassName() const override;
31
32 // Overridden from SearchResultContainerView:
33 void OnContainerSelected(bool from_bottom,
34 bool directional_movement) override;
35 void NotifyFirstResultYIndex(int y_index) override {}
36 int GetYSize() override;
37 int DoUpdate() override;
38 void UpdateSelectedIndex(int old_selected, int new_selected) override;
39
40 // Overridden from AppListModelObserver
41 void OnSearchAnswerAvailableChanged(bool has_answer) override;
42
43 // Unowned pointer to application list model.
44 AppListModel* const model_;
45
46 // Pointer to the container of the search answer; owned by the view hierarchy.
47 // It's visible iff we have a search answer result.
48 SearchAnswerContainerView* const search_answer_container_view_;
49
50 DISALLOW_COPY_AND_ASSIGN(SearchResultAnswerCardView);
51 };
52
53 } // namespace app_list
54
55 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_ANSWER_CARD_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/search_result_answer_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698