Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_manager_util.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/chromeos/extensions/wallpaper_manager_util.h" 5 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
15 #include "chrome/browser/ui/chrome_pages.h" 14 #include "chrome/browser/ui/chrome_pages.h"
16 #include "chrome/browser/ui/extensions/application_launch.h" 15 #include "chrome/browser/ui/extensions/application_launch.h"
17 #include "chrome/browser/ui/host_desktop.h" 16 #include "chrome/browser/ui/host_desktop.h"
18 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "extensions/browser/extension_system.h"
19 #include "extensions/common/constants.h" 19 #include "extensions/common/constants.h"
20 20
21 namespace wallpaper_manager_util { 21 namespace wallpaper_manager_util {
22 22
23 void OpenWallpaperManager() { 23 void OpenWallpaperManager() {
24 Profile* profile = ProfileManager::GetActiveUserProfile(); 24 Profile* profile = ProfileManager::GetActiveUserProfile();
25 DCHECK(profile); 25 DCHECK(profile);
26 26
27 ExtensionService* service = 27 ExtensionService* service =
28 extensions::ExtensionSystem::Get(profile)->extension_service(); 28 extensions::ExtensionSystem::Get(profile)->extension_service();
29 if (!service) 29 if (!service)
30 return; 30 return;
31 31
32 const extensions::Extension* extension = 32 const extensions::Extension* extension =
33 service->GetExtensionById(extension_misc::kWallpaperManagerId, false); 33 service->GetExtensionById(extension_misc::kWallpaperManagerId, false);
34 if (!extension) 34 if (!extension)
35 return; 35 return;
36 36
37 OpenApplication(AppLaunchParams(profile, extension, 37 OpenApplication(AppLaunchParams(profile, extension,
38 extensions::LAUNCH_CONTAINER_WINDOW, 38 extensions::LAUNCH_CONTAINER_WINDOW,
39 NEW_WINDOW)); 39 NEW_WINDOW));
40 } 40 }
41 41
42 } // namespace wallpaper_manager_util 42 } // namespace wallpaper_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698