Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / apps / app_load_service.cc
index 071f95e..ae60f7f 100644 (file)
@@ -5,18 +5,18 @@
 #include "apps/app_load_service.h"
 
 #include "apps/app_load_service_factory.h"
+#include "apps/app_window_registry.h"
 #include "apps/launcher.h"
-#include "apps/shell_window_registry.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_host.h"
 #include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
 #include "chrome/browser/extensions/unpacked_installer.h"
 #include "chrome/browser/profiles/profile.h"
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/notification_types.h"
 #include "extensions/browser/extension_prefs.h"
+#include "extensions/browser/extension_system.h"
 #include "extensions/common/extension.h"
 
 using extensions::Extension;
@@ -54,7 +54,7 @@ bool AppLoadService::LoadAndLaunch(const base::FilePath& extension_path,
                                    const CommandLine& command_line,
                                    const base::FilePath& current_dir) {
   ExtensionService* extension_service =
-      ExtensionSystem::GetForBrowserContext(profile_)->extension_service();
+      ExtensionSystem::Get(profile_)->extension_service();
   std::string extension_id;
   if (!extensions::UnpackedInstaller::Create(extension_service)->
           LoadFromCommandLine(base::FilePath(extension_path), &extension_id)) {
@@ -116,7 +116,7 @@ void AppLoadService::Observe(int type,
         break;
 
       if (WasUnloadedForReload(*unload_info) &&
-          HasShellWindows(unload_info->extension->id()) &&
+          HasAppWindows(unload_info->extension->id()) &&
           !HasPostReloadAction(unload_info->extension->id())) {
         post_reload_actions_[unload_info->extension->id()].action_type = LAUNCH;
       }
@@ -127,9 +127,10 @@ void AppLoadService::Observe(int type,
   }
 }
 
-bool AppLoadService::HasShellWindows(const std::string& extension_id) {
-  return !ShellWindowRegistry::Get(profile_)->
-      GetShellWindowsForApp(extension_id).empty();
+bool AppLoadService::HasAppWindows(const std::string& extension_id) {
+  return !AppWindowRegistry::Get(profile_)
+              ->GetAppWindowsForApp(extension_id)
+              .empty();
 }
 
 bool AppLoadService::WasUnloadedForReload(