| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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: // Falls through. |
| 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 Loading... |
| 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 |
| OLD | NEW |