| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/views/app_list_main_view.h" | 5 #include "ui/app_list/views/app_list_main_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 void AppListMainView::Close() { | 129 void AppListMainView::Close() { |
| 130 icon_loading_wait_timer_.Stop(); | 130 icon_loading_wait_timer_.Stop(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void AppListMainView::Prerender() { | 133 void AppListMainView::Prerender() { |
| 134 contents_view_->Prerender(); | 134 contents_view_->Prerender(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void AppListMainView::SetDragAndDropHostOfCurrentAppList( |
| 138 app_list::ApplicationDragAndDropHost* drag_and_drop_host) { |
| 139 contents_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host); |
| 140 } |
| 141 |
| 137 void AppListMainView::PreloadIcons(PaginationModel* pagination_model, | 142 void AppListMainView::PreloadIcons(PaginationModel* pagination_model, |
| 138 views::View* anchor) { | 143 views::View* anchor) { |
| 139 ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P; | 144 ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P; |
| 140 if (anchor && anchor->GetWidget()) { | 145 if (anchor && anchor->GetWidget()) { |
| 141 scale_factor = ui::GetScaleFactorForNativeView( | 146 scale_factor = ui::GetScaleFactorForNativeView( |
| 142 anchor->GetWidget()->GetNativeView()); | 147 anchor->GetWidget()->GetNativeView()); |
| 143 } | 148 } |
| 144 | 149 |
| 145 // |pagination_model| could have -1 as the initial selected page and | 150 // |pagination_model| could have -1 as the initial selected page and |
| 146 // assumes first page (i.e. index 0) will be used in this case. | 151 // assumes first page (i.e. index 0) will be used in this case. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 208 } |
| 204 | 209 |
| 205 void AppListMainView::InvokeResultAction(const SearchResult& result, | 210 void AppListMainView::InvokeResultAction(const SearchResult& result, |
| 206 int action_index, | 211 int action_index, |
| 207 int event_flags) { | 212 int event_flags) { |
| 208 if (delegate_) | 213 if (delegate_) |
| 209 delegate_->InvokeSearchResultAction(result, action_index, event_flags); | 214 delegate_->InvokeSearchResultAction(result, action_index, event_flags); |
| 210 } | 215 } |
| 211 | 216 |
| 212 } // namespace app_list | 217 } // namespace app_list |
| OLD | NEW |