OLD | NEW |
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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 SearchResult::Action::~Action() {} | 26 SearchResult::Action::~Action() {} |
27 | 27 |
28 SearchResult::SearchResult() | 28 SearchResult::SearchResult() |
29 : relevance_(0), | 29 : relevance_(0), |
30 display_type_(DISPLAY_LIST), | 30 display_type_(DISPLAY_LIST), |
31 is_installing_(false), | 31 is_installing_(false), |
32 percent_downloaded_(0) { | 32 percent_downloaded_(0) { |
33 } | 33 } |
34 | 34 |
35 SearchResult::~SearchResult() {} | 35 SearchResult::~SearchResult() { |
| 36 FOR_EACH_OBSERVER(SearchResultObserver, observers_, OnResultDestroying()); |
| 37 } |
36 | 38 |
37 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { | 39 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { |
38 icon_ = icon; | 40 icon_ = icon; |
39 FOR_EACH_OBSERVER(SearchResultObserver, | 41 FOR_EACH_OBSERVER(SearchResultObserver, |
40 observers_, | 42 observers_, |
41 OnIconChanged()); | 43 OnIconChanged()); |
42 } | 44 } |
43 | 45 |
44 void SearchResult::SetActions(const Actions& sets) { | 46 void SearchResult::SetActions(const Actions& sets) { |
45 actions_ = sets; | 47 actions_ = sets; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 101 } |
100 | 102 |
101 void SearchResult::InvokeAction(int action_index, int event_flags) { | 103 void SearchResult::InvokeAction(int action_index, int event_flags) { |
102 } | 104 } |
103 | 105 |
104 ui::MenuModel* SearchResult::GetContextMenuModel() { | 106 ui::MenuModel* SearchResult::GetContextMenuModel() { |
105 return NULL; | 107 return NULL; |
106 } | 108 } |
107 | 109 |
108 } // namespace app_list | 110 } // namespace app_list |
OLD | NEW |