BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / wallpaper_manager_util.cc
blob46ed021b3f889f144b86554277df1d16c2c45a41
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
7 #include "base/logging.h"
8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/browser/ui/extensions/app_launch_params.h"
12 #include "chrome/browser/ui/extensions/application_launch.h"
13 #include "chrome/common/extensions/extension_constants.h"
14 #include "extensions/browser/extension_system.h"
15 #include "extensions/common/constants.h"
16 #include "extensions/common/extension.h"
17 #include "ui/base/window_open_disposition.h"
19 namespace wallpaper_manager_util {
21 void OpenWallpaperManager() {
22 Profile* profile = ProfileManager::GetActiveUserProfile();
23 DCHECK(profile);
25 ExtensionService* service =
26 extensions::ExtensionSystem::Get(profile)->extension_service();
27 if (!service)
28 return;
30 const extensions::Extension* extension =
31 service->GetExtensionById(extension_misc::kWallpaperManagerId, false);
32 if (!extension)
33 return;
35 OpenApplication(
36 AppLaunchParams(profile, extension, extensions::LAUNCH_CONTAINER_WINDOW,
37 NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL));
40 } // namespace wallpaper_manager_util