| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/api/launcher_page/launcher_page_api.h" | 5 #include "chrome/browser/extensions/api/launcher_page/launcher_page_api.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/app_list/app_list_service.h" | 9 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 10 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 10 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 11 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | 11 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
| 12 #include "chrome/browser/ui/host_desktop.h" |
| 12 #include "chrome/common/extensions/api/launcher_page.h" | 13 #include "chrome/common/extensions/api/launcher_page.h" |
| 13 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 14 #include "ui/app_list/app_list_model.h" | 15 #include "ui/app_list/app_list_model.h" |
| 15 | 16 |
| 16 namespace extensions { | 17 namespace extensions { |
| 17 | 18 |
| 18 static base::LazyInstance<BrowserContextKeyedAPIFactory<LauncherPageAPI>> | 19 static base::LazyInstance<BrowserContextKeyedAPIFactory<LauncherPageAPI>> |
| 19 g_factory = LAZY_INSTANCE_INITIALIZER; | 20 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 20 | 21 |
| 21 // static | 22 // static |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 LauncherPageAPI::GetFactoryInstance() | 89 LauncherPageAPI::GetFactoryInstance() |
| 89 ->Get(browser_context()) | 90 ->Get(browser_context()) |
| 90 ->GetService(); | 91 ->GetService(); |
| 91 app_list::AppListModel* model = service->GetModel(); | 92 app_list::AppListModel* model = service->GetModel(); |
| 92 model->SetCustomLauncherPageEnabled(params->enabled); | 93 model->SetCustomLauncherPageEnabled(params->enabled); |
| 93 | 94 |
| 94 return RespondNow(NoArguments()); | 95 return RespondNow(NoArguments()); |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace extensions | 98 } // namespace extensions |
| OLD | NEW |