| 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/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::SearchResult() { | 11 SearchResult::SearchResult() { |
| 12 } | 12 } |
| 13 | 13 |
| 14 SearchResult::~SearchResult() { | 14 SearchResult::~SearchResult() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { | 17 void SearchResult::SetIcon(const gfx::ImageSkia& icon) { |
| 18 icon_ = icon; | 18 icon_ = icon; |
| 19 FOR_EACH_OBSERVER(SearchResultObserver, | 19 FOR_EACH_OBSERVER(SearchResultObserver, |
| 20 observers_, | 20 observers_, |
| 21 OnIconChanged()); | 21 OnIconChanged()); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void SearchResult::SetActionIcons(const std::vector<ActionIconSet>& sets) { |
| 25 action_icons_ = sets; |
| 26 FOR_EACH_OBSERVER(SearchResultObserver, |
| 27 observers_, |
| 28 OnActionIconsChanged()); |
| 29 } |
| 30 |
| 24 void SearchResult::AddObserver(SearchResultObserver* observer) { | 31 void SearchResult::AddObserver(SearchResultObserver* observer) { |
| 25 observers_.AddObserver(observer); | 32 observers_.AddObserver(observer); |
| 26 } | 33 } |
| 27 | 34 |
| 28 void SearchResult::RemoveObserver(SearchResultObserver* observer) { | 35 void SearchResult::RemoveObserver(SearchResultObserver* observer) { |
| 29 observers_.RemoveObserver(observer); | 36 observers_.RemoveObserver(observer); |
| 30 } | 37 } |
| 31 | 38 |
| 32 } // namespace app_list | 39 } // namespace app_list |
| OLD | NEW |