| 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/ash/app_list/app_list_controller_ash.h" | 5 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_delegate.h" | 7 #include "ash/common/shelf/shelf_delegate.h" |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 DismissView(); | 121 DismissView(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void AppListControllerDelegateAsh::LaunchApp( | 124 void AppListControllerDelegateAsh::LaunchApp( |
| 125 Profile* profile, | 125 Profile* profile, |
| 126 const extensions::Extension* extension, | 126 const extensions::Extension* extension, |
| 127 AppListSource source, | 127 AppListSource source, |
| 128 int event_flags) { | 128 int event_flags) { |
| 129 ChromeLauncherController::instance()->LaunchApp( | 129 ChromeLauncherController::instance()->LaunchApp( |
| 130 ash::AppLauncherId(extension->id()), AppListSourceToLaunchSource(source), | 130 ash::AppLaunchId(extension->id()), AppListSourceToLaunchSource(source), |
| 131 event_flags); | 131 event_flags); |
| 132 DismissView(); | 132 DismissView(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void AppListControllerDelegateAsh::ShowForProfileByPath( | 135 void AppListControllerDelegateAsh::ShowForProfileByPath( |
| 136 const base::FilePath& profile_path) { | 136 const base::FilePath& profile_path) { |
| 137 // Ash doesn't have profile switching. | 137 // Ash doesn't have profile switching. |
| 138 NOTREACHED(); | 138 NOTREACHED(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 bool AppListControllerDelegateAsh::ShouldShowUserIcon() { | 141 bool AppListControllerDelegateAsh::ShouldShowUserIcon() { |
| 142 return false; | 142 return false; |
| 143 } | 143 } |
| 144 | 144 |
| 145 ash::ShelfLaunchSource | 145 ash::ShelfLaunchSource |
| 146 AppListControllerDelegateAsh::AppListSourceToLaunchSource( | 146 AppListControllerDelegateAsh::AppListSourceToLaunchSource( |
| 147 AppListSource source) { | 147 AppListSource source) { |
| 148 switch (source) { | 148 switch (source) { |
| 149 case LAUNCH_FROM_APP_LIST: | 149 case LAUNCH_FROM_APP_LIST: |
| 150 return ash::LAUNCH_FROM_APP_LIST; | 150 return ash::LAUNCH_FROM_APP_LIST; |
| 151 case LAUNCH_FROM_APP_LIST_SEARCH: | 151 case LAUNCH_FROM_APP_LIST_SEARCH: |
| 152 return ash::LAUNCH_FROM_APP_LIST_SEARCH; | 152 return ash::LAUNCH_FROM_APP_LIST_SEARCH; |
| 153 default: | 153 default: |
| 154 return ash::LAUNCH_FROM_UNKNOWN; | 154 return ash::LAUNCH_FROM_UNKNOWN; |
| 155 } | 155 } |
| 156 } | 156 } |
| OLD | NEW |