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

Side by Side Diff: ui/app_list/search_result.cc

Issue 796793002: Make app list recommendations into their own DisplayType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mathp_suggestions_search
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/app_list/search_result.h" 5 #include "ui/app_list/search_result.h"
6 6
7 #include "ui/app_list/app_list_constants.h" 7 #include "ui/app_list/app_list_constants.h"
8 #include "ui/app_list/search_result_observer.h" 8 #include "ui/app_list/search_result_observer.h"
9 9
10 namespace app_list { 10 namespace app_list {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return; 65 return;
66 66
67 percent_downloaded_ = percent_downloaded; 67 percent_downloaded_ = percent_downloaded;
68 FOR_EACH_OBSERVER(SearchResultObserver, 68 FOR_EACH_OBSERVER(SearchResultObserver,
69 observers_, 69 observers_,
70 OnPercentDownloadedChanged()); 70 OnPercentDownloadedChanged());
71 } 71 }
72 72
73 int SearchResult::GetPreferredIconDimension() const { 73 int SearchResult::GetPreferredIconDimension() const {
74 switch (display_type_) { 74 switch (display_type_) {
75 case DISPLAY_RECOMMENDATION:
Matt Giuca 2014/12/11 08:00:57 // Fallthrough.
calamity 2014/12/12 05:00:24 Done.
75 case DISPLAY_TILE: 76 case DISPLAY_TILE:
76 return kTileIconSize; 77 return kTileIconSize;
77 case DISPLAY_LIST: 78 case DISPLAY_LIST:
78 return kListIconSize; 79 return kListIconSize;
79 case DISPLAY_NONE: 80 case DISPLAY_NONE:
80 return 0; 81 return 0;
81 } 82 }
82 NOTREACHED(); 83 NOTREACHED();
83 return 0; 84 return 0;
84 } 85 }
(...skipping 14 matching lines...) Expand all
99 } 100 }
100 101
101 void SearchResult::InvokeAction(int action_index, int event_flags) { 102 void SearchResult::InvokeAction(int action_index, int event_flags) {
102 } 103 }
103 104
104 ui::MenuModel* SearchResult::GetContextMenuModel() { 105 ui::MenuModel* SearchResult::GetContextMenuModel() {
105 return NULL; 106 return NULL;
106 } 107 }
107 108
108 } // namespace app_list 109 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698