| 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 "chrome/browser/ui/views/app_list/linux/app_list_service_linux.h" | 5 #include "chrome/browser/ui/views/app_list/linux/app_list_service_linux.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "chrome/browser/apps/scoped_keep_alive.h" | 9 #include "chrome/browser/apps/scoped_keep_alive.h" |
| 10 #include "chrome/browser/shell_integration.h" | 10 #include "chrome/browser/shell_integration.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 LOG(WARNING) << "Unable to create App Launcher shortcut."; | 34 LOG(WARNING) << "Unable to create App Launcher shortcut."; |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| 39 | 39 |
| 40 AppListServiceLinux::~AppListServiceLinux() {} | 40 AppListServiceLinux::~AppListServiceLinux() {} |
| 41 | 41 |
| 42 // static | 42 // static |
| 43 AppListServiceLinux* AppListServiceLinux::GetInstance() { | 43 AppListServiceLinux* AppListServiceLinux::GetInstance() { |
| 44 return Singleton<AppListServiceLinux, | 44 return base::Singleton<AppListServiceLinux, base::LeakySingletonTraits< |
| 45 LeakySingletonTraits<AppListServiceLinux> >::get(); | 45 AppListServiceLinux>>::get(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void AppListServiceLinux::CreateShortcut() { | 48 void AppListServiceLinux::CreateShortcut() { |
| 49 content::BrowserThread::PostTask( | 49 content::BrowserThread::PostTask( |
| 50 content::BrowserThread::FILE, FROM_HERE, base::Bind(&CreateShortcuts)); | 50 content::BrowserThread::FILE, FROM_HERE, base::Bind(&CreateShortcuts)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void AppListServiceLinux::OnActivationChanged(views::Widget* /*widget*/, | 53 void AppListServiceLinux::OnActivationChanged(views::Widget* /*widget*/, |
| 54 bool active) { | 54 bool active) { |
| 55 if (active) | 55 if (active) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 return AppListServiceLinux::GetInstance(); | 93 return AppListServiceLinux::GetInstance(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 // static | 96 // static |
| 97 void AppListService::InitAll(Profile* initial_profile, | 97 void AppListService::InitAll(Profile* initial_profile, |
| 98 const base::FilePath& profile_path) { | 98 const base::FilePath& profile_path) { |
| 99 AppListServiceAsh::GetInstance()->Init(initial_profile); | 99 AppListServiceAsh::GetInstance()->Init(initial_profile); |
| 100 AppListServiceLinux::GetInstance()->Init(initial_profile); | 100 AppListServiceLinux::GetInstance()->Init(initial_profile); |
| 101 } | 101 } |
| OLD | NEW |