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

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

Issue 2910173003: Revert of Making answer card to behave like other results. (Closed)
Patch Set: 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 namespace {
17 class SearchAnswerContainerView;
18 }
19
20 // Result container for the search answer card.
21 class APP_LIST_EXPORT SearchResultAnswerCardView
22 : public SearchResultContainerView,
23 public AppListModelObserver {
24 public:
25 SearchResultAnswerCardView(AppListModel* model,
26 SearchResultPageView* search_results_page_view,
27 views::View* search_answer_view);
28 ~SearchResultAnswerCardView() override;
29
30 private:
31 // Overridden from views::View:
32 const char* GetClassName() const override;
33
34 // Overridden from SearchResultContainerView:
35 void OnContainerSelected(bool from_bottom,
36 bool directional_movement) override;
37 void NotifyFirstResultYIndex(int y_index) override {}
38 int GetYSize() override;
39 int DoUpdate() override;
40 void UpdateSelectedIndex(int old_selected, int new_selected) override;
41
42 // Overridden from AppListModelObserver
43 void OnSearchAnswerAvailableChanged(bool has_answer) override;
44
45 // Unowned pointer to application list model.
46 AppListModel* const model_;
47
48 // Pointer to the container of the search answer; owned by the view hierarchy.
49 // It's visible iff we have a search answer result.
50 SearchAnswerContainerView* const search_answer_container_view_;
51
52 DISALLOW_COPY_AND_ASSIGN(SearchResultAnswerCardView);
53 };
54
55 } // namespace app_list
56
57 #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