| 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 <ApplicationServices/ApplicationServices.h> | 5 #include <ApplicationServices/ApplicationServices.h> |
| 6 #import <Cocoa/Cocoa.h> | 6 #import <Cocoa/Cocoa.h> |
| 7 | 7 |
| 8 #include "apps/app_launcher.h" | 8 #include "apps/app_launcher.h" |
| 9 #include "apps/app_shim/app_shim_handler_mac.h" | 9 #include "apps/app_shim/app_shim_handler_mac.h" |
| 10 #include "apps/app_shim/app_shim_mac.h" | 10 #include "apps/app_shim/app_shim_mac.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 virtual bool CanPin() OVERRIDE; | 111 virtual bool CanPin() OVERRIDE; |
| 112 virtual bool CanDoCreateShortcutsFlow(bool is_platform_app) OVERRIDE; | 112 virtual bool CanDoCreateShortcutsFlow(bool is_platform_app) OVERRIDE; |
| 113 virtual void DoCreateShortcutsFlow(Profile* profile, | 113 virtual void DoCreateShortcutsFlow(Profile* profile, |
| 114 const std::string& extension_id) OVERRIDE; | 114 const std::string& extension_id) OVERRIDE; |
| 115 virtual void ActivateApp(Profile* profile, | 115 virtual void ActivateApp(Profile* profile, |
| 116 const extensions::Extension* extension, | 116 const extensions::Extension* extension, |
| 117 int event_flags) OVERRIDE; | 117 int event_flags) OVERRIDE; |
| 118 virtual void LaunchApp(Profile* profile, | 118 virtual void LaunchApp(Profile* profile, |
| 119 const extensions::Extension* extension, | 119 const extensions::Extension* extension, |
| 120 int event_flags) OVERRIDE; | 120 int event_flags) OVERRIDE; |
| 121 virtual void ShowAppsGrid() OVERRIDE; |
| 121 | 122 |
| 122 DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateCocoa); | 123 DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateCocoa); |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 ShellIntegration::ShortcutInfo GetAppListShortcutInfo( | 126 ShellIntegration::ShortcutInfo GetAppListShortcutInfo( |
| 126 const base::FilePath& profile_path) { | 127 const base::FilePath& profile_path) { |
| 127 ShellIntegration::ShortcutInfo shortcut_info; | 128 ShellIntegration::ShortcutInfo shortcut_info; |
| 128 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 129 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 129 if (channel == chrome::VersionInfo::CHANNEL_CANARY) { | 130 if (channel == chrome::VersionInfo::CHANNEL_CANARY) { |
| 130 shortcut_info.title = | 131 shortcut_info.title = |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 Profile* profile, const extensions::Extension* extension, int event_flags) { | 262 Profile* profile, const extensions::Extension* extension, int event_flags) { |
| 262 LaunchApp(profile, extension, event_flags); | 263 LaunchApp(profile, extension, event_flags); |
| 263 } | 264 } |
| 264 | 265 |
| 265 void AppListControllerDelegateCocoa::LaunchApp( | 266 void AppListControllerDelegateCocoa::LaunchApp( |
| 266 Profile* profile, const extensions::Extension* extension, int event_flags) { | 267 Profile* profile, const extensions::Extension* extension, int event_flags) { |
| 267 chrome::OpenApplication(chrome::AppLaunchParams( | 268 chrome::OpenApplication(chrome::AppLaunchParams( |
| 268 profile, extension, NEW_FOREGROUND_TAB)); | 269 profile, extension, NEW_FOREGROUND_TAB)); |
| 269 } | 270 } |
| 270 | 271 |
| 272 void AppListControllerDelegateCocoa::ShowAppsGrid() { |
| 273 NOTIMPLEMENTED(); |
| 274 } |
| 275 |
| 271 void AppListServiceMac::CreateAppList(Profile* requested_profile) { | 276 void AppListServiceMac::CreateAppList(Profile* requested_profile) { |
| 272 if (profile() == requested_profile) | 277 if (profile() == requested_profile) |
| 273 return; | 278 return; |
| 274 | 279 |
| 275 // The Objective C objects might be released at some unknown point in the | 280 // The Objective C objects might be released at some unknown point in the |
| 276 // future, so explicitly clear references to C++ objects. | 281 // future, so explicitly clear references to C++ objects. |
| 277 [[window_controller_ appListViewController] | 282 [[window_controller_ appListViewController] |
| 278 setDelegate:scoped_ptr<app_list::AppListViewDelegate>()]; | 283 setDelegate:scoped_ptr<app_list::AppListViewDelegate>()]; |
| 279 | 284 |
| 280 SetProfile(requested_profile); | 285 SetProfile(requested_profile); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 | 513 |
| 509 // static | 514 // static |
| 510 AppListService* AppListService::Get() { | 515 AppListService* AppListService::Get() { |
| 511 return AppListServiceMac::GetInstance(); | 516 return AppListServiceMac::GetInstance(); |
| 512 } | 517 } |
| 513 | 518 |
| 514 // static | 519 // static |
| 515 void AppListService::InitAll(Profile* initial_profile) { | 520 void AppListService::InitAll(Profile* initial_profile) { |
| 516 Get()->Init(initial_profile); | 521 Get()->Init(initial_profile); |
| 517 } | 522 } |
| OLD | NEW |