| 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 "chrome/browser/ui/app_list/app_list_view_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| 9 #include "chrome/browser/ui/app_list/apps_model_builder.h" | 9 #include "chrome/browser/ui/app_list/apps_model_builder.h" |
| 10 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" | 10 #include "chrome/browser/ui/app_list/chrome_app_list_item.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #if defined(USE_ASH) | 47 #if defined(USE_ASH) |
| 48 app_sync_ui_state_watcher_.reset(); | 48 app_sync_ui_state_watcher_.reset(); |
| 49 #endif | 49 #endif |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 app_list::SigninDelegate* AppListViewDelegate::GetSigninDelegate() { | 53 app_list::SigninDelegate* AppListViewDelegate::GetSigninDelegate() { |
| 54 return signin_delegate_.get(); | 54 return signin_delegate_.get(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void AppListViewDelegate::OnBeginExtensionInstall( | |
| 58 const std::string& extension_id, | |
| 59 const std::string& extension_name, | |
| 60 const gfx::ImageSkia& installing_icon) { | |
| 61 apps_builder_->OnBeginExtensionInstall(extension_id, | |
| 62 extension_name, | |
| 63 installing_icon); | |
| 64 } | |
| 65 | |
| 66 void AppListViewDelegate::OnDownloadProgress( | |
| 67 const std::string& extension_id, | |
| 68 int percent_downloaded) { | |
| 69 apps_builder_->OnDownloadProgress(extension_id, percent_downloaded); | |
| 70 } | |
| 71 | |
| 72 void AppListViewDelegate::OnInstallFailure(const std::string& extension_id) { | |
| 73 apps_builder_->OnInstallFailure(extension_id); | |
| 74 } | |
| 75 | |
| 76 void AppListViewDelegate::ActivateAppListItem( | 57 void AppListViewDelegate::ActivateAppListItem( |
| 77 app_list::AppListItemModel* item, | 58 app_list::AppListItemModel* item, |
| 78 int event_flags) { | 59 int event_flags) { |
| 79 content::RecordAction(content::UserMetricsAction("AppList_ClickOnApp")); | 60 content::RecordAction(content::UserMetricsAction("AppList_ClickOnApp")); |
| 80 static_cast<ChromeAppListItem*>(item)->Activate(event_flags); | 61 static_cast<ChromeAppListItem*>(item)->Activate(event_flags); |
| 81 } | 62 } |
| 82 | 63 |
| 83 void AppListViewDelegate::StartSearch() { | 64 void AppListViewDelegate::StartSearch() { |
| 84 if (search_builder_.get()) | 65 if (search_builder_.get()) |
| 85 search_builder_->StartSearch(); | 66 search_builder_->StartSearch(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 113 controller_->ViewClosing(); | 94 controller_->ViewClosing(); |
| 114 } | 95 } |
| 115 | 96 |
| 116 void AppListViewDelegate::ViewActivationChanged(bool active) { | 97 void AppListViewDelegate::ViewActivationChanged(bool active) { |
| 117 controller_->ViewActivationChanged(active); | 98 controller_->ViewActivationChanged(active); |
| 118 } | 99 } |
| 119 | 100 |
| 120 gfx::ImageSkia AppListViewDelegate::GetWindowIcon() { | 101 gfx::ImageSkia AppListViewDelegate::GetWindowIcon() { |
| 121 return controller_->GetWindowIcon(); | 102 return controller_->GetWindowIcon(); |
| 122 } | 103 } |
| OLD | NEW |