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

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

Issue 2952763002: SearchBoxView now enables/disables cursor based on user interaction. (Closed)
Patch Set: rebased. Created 3 years, 5 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/search_box_view.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_
6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 AppListModel::State from_state, 46 AppListModel::State from_state,
47 AppListModel::State to_state) override; 47 AppListModel::State to_state) override;
48 int GetSearchBoxZHeight() const override; 48 int GetSearchBoxZHeight() const override;
49 void OnHidden() override; 49 void OnHidden() override;
50 50
51 void ClearSelectedIndex(); 51 void ClearSelectedIndex();
52 52
53 // Overridden from SearchResultContainerView::Delegate : 53 // Overridden from SearchResultContainerView::Delegate :
54 void OnSearchResultContainerResultsChanged() override; 54 void OnSearchResultContainerResultsChanged() override;
55 55
56 views::View* contents_view() { return contents_view_; }
57
56 private: 58 private:
57 // |directional_movement| is true if the navigation was caused by directional 59 // |directional_movement| is true if the navigation was caused by directional
58 // controls (eg, arrow keys), as opposed to linear controls (eg, Tab). 60 // controls (eg, arrow keys), as opposed to linear controls (eg, Tab).
59 void SetSelectedIndex(int index, bool directional_movement); 61 void SetSelectedIndex(int index, bool directional_movement);
60 bool IsValidSelectionIndex(int index); 62 bool IsValidSelectionIndex(int index);
61 63
62 // The SearchResultContainerViews that compose the search page. All owned by 64 // The SearchResultContainerViews that compose the search page. All owned by
63 // the views hierarchy. 65 // the views hierarchy.
64 std::vector<SearchResultContainerView*> result_container_views_; 66 std::vector<SearchResultContainerView*> result_container_views_;
65 67
66 // -1 indicates no selection. 68 // -1 indicates no selection.
67 int selected_index_; 69 int selected_index_;
68 70
69 // Whether to use new UX design for search results. 71 // Whether to use new UX design for search results.
70 bool const is_new_design_; 72 bool const is_new_design_;
71 73
72 // View containing SearchCardView instances. Owned by view hierarchy. 74 // View containing SearchCardView instances. Owned by view hierarchy.
73 views::View* const contents_view_; 75 views::View* const contents_view_;
74 76
75 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView); 77 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView);
76 }; 78 };
77 79
78 } // namespace app_list 80 } // namespace app_list
79 81
80 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ 82 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698