| 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 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void SearchResult::SetPercentDownloaded(int percent_downloaded) { | 55 void SearchResult::SetPercentDownloaded(int percent_downloaded) { |
| 56 if (percent_downloaded_ == percent_downloaded) | 56 if (percent_downloaded_ == percent_downloaded) |
| 57 return; | 57 return; |
| 58 | 58 |
| 59 percent_downloaded_ = percent_downloaded; | 59 percent_downloaded_ = percent_downloaded; |
| 60 FOR_EACH_OBSERVER(SearchResultObserver, | 60 FOR_EACH_OBSERVER(SearchResultObserver, |
| 61 observers_, | 61 observers_, |
| 62 OnPercentDownloadedChanged()); | 62 OnPercentDownloadedChanged()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void SearchResult::NotifyItemInstalled() { |
| 66 FOR_EACH_OBSERVER(SearchResultObserver, |
| 67 observers_, |
| 68 OnItemInstalled()); |
| 69 } |
| 70 |
| 65 void SearchResult::AddObserver(SearchResultObserver* observer) { | 71 void SearchResult::AddObserver(SearchResultObserver* observer) { |
| 66 observers_.AddObserver(observer); | 72 observers_.AddObserver(observer); |
| 67 } | 73 } |
| 68 | 74 |
| 69 void SearchResult::RemoveObserver(SearchResultObserver* observer) { | 75 void SearchResult::RemoveObserver(SearchResultObserver* observer) { |
| 70 observers_.RemoveObserver(observer); | 76 observers_.RemoveObserver(observer); |
| 71 } | 77 } |
| 72 | 78 |
| 73 ui::MenuModel* SearchResult::GetContextMenuModel() { | 79 ui::MenuModel* SearchResult::GetContextMenuModel() { |
| 74 return NULL; | 80 return NULL; |
| 75 } | 81 } |
| 76 | 82 |
| 77 } // namespace app_list | 83 } // namespace app_list |
| OLD | NEW |