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

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

Issue 455323003: Add DisplayType to app list SearchResults (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/search_result.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/search_result_observer.h" 7 #include "ui/app_list/search_result_observer.h"
8 8
9 namespace app_list { 9 namespace app_list {
10 10
11 SearchResult::Action::Action(const gfx::ImageSkia& base_image, 11 SearchResult::Action::Action(const gfx::ImageSkia& base_image,
12 const gfx::ImageSkia& hover_image, 12 const gfx::ImageSkia& hover_image,
13 const gfx::ImageSkia& pressed_image, 13 const gfx::ImageSkia& pressed_image,
14 const base::string16& tooltip_text) 14 const base::string16& tooltip_text)
15 : base_image(base_image), 15 : base_image(base_image),
16 hover_image(hover_image), 16 hover_image(hover_image),
17 pressed_image(pressed_image), 17 pressed_image(pressed_image),
18 tooltip_text(tooltip_text) {} 18 tooltip_text(tooltip_text) {}
19 19
20 SearchResult::Action::Action(const base::string16& label_text, 20 SearchResult::Action::Action(const base::string16& label_text,
21 const base::string16& tooltip_text) 21 const base::string16& tooltip_text)
22 : tooltip_text(tooltip_text), 22 : tooltip_text(tooltip_text),
23 label_text(label_text) {} 23 label_text(label_text) {}
24 24
25 SearchResult::Action::~Action() {} 25 SearchResult::Action::~Action() {}
26 26
27 SearchResult::SearchResult() 27 SearchResult::SearchResult()
28 : relevance_(0), is_installing_(false), percent_downloaded_(0) { 28 : relevance_(0),
29 display_type_(DISPLAY_LIST),
30 is_installing_(false),
31 percent_downloaded_(0) {
29 } 32 }
30 33
31 SearchResult::~SearchResult() {} 34 SearchResult::~SearchResult() {}
32 35
33 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { 36 void SearchResult::SetIcon(const gfx::ImageSkia& icon) {
34 icon_ = icon; 37 icon_ = icon;
35 FOR_EACH_OBSERVER(SearchResultObserver, 38 FOR_EACH_OBSERVER(SearchResultObserver,
36 observers_, 39 observers_,
37 OnIconChanged()); 40 OnIconChanged());
38 } 41 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 87 }
85 88
86 void SearchResult::InvokeAction(int action_index, int event_flags) { 89 void SearchResult::InvokeAction(int action_index, int event_flags) {
87 } 90 }
88 91
89 ui::MenuModel* SearchResult::GetContextMenuModel() { 92 ui::MenuModel* SearchResult::GetContextMenuModel() {
90 return NULL; 93 return NULL;
91 } 94 }
92 95
93 } // namespace app_list 96 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search_result.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698