Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / file_system / file_system_api.cc
index 6ad9a61..291cb09 100644 (file)
@@ -4,9 +4,9 @@
 
 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
 
+#include "apps/app_window.h"
+#include "apps/app_window_registry.h"
 #include "apps/saved_files_service.h"
-#include "apps/shell_window.h"
-#include "apps/shell_window_registry.h"
 #include "base/bind.h"
 #include "base/file_util.h"
 #include "base/files/file_path.h"
@@ -20,7 +20,6 @@
 #include "base/values.h"
 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h"
 #include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
 #include "chrome/browser/platform_util.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/apps/directory_access_confirmation_dialog.h"
@@ -33,6 +32,7 @@
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_view.h"
+#include "extensions/browser/extension_system.h"
 #include "extensions/common/permissions/api_permission.h"
 #include "grit/generated_resources.h"
 #include "net/base/mime_util.h"
@@ -55,7 +55,7 @@
 
 using apps::SavedFileEntry;
 using apps::SavedFilesService;
-using apps::ShellWindow;
+using apps::AppWindow;
 using fileapi::IsolatedContext;
 
 const char kInvalidCallingPage[] = "Invalid calling page. This function can't "
@@ -546,17 +546,17 @@ void FileSystemChooseEntryFunction::ShowPicker(
   // platform-app only.
   content::WebContents* web_contents = NULL;
   if (extension_->is_platform_app()) {
-    apps::ShellWindowRegistry* registry =
-        apps::ShellWindowRegistry::Get(GetProfile());
+    apps::AppWindowRegistry* registry =
+        apps::AppWindowRegistry::Get(GetProfile());
     DCHECK(registry);
-    ShellWindow* shell_window = registry->GetShellWindowForRenderViewHost(
-        render_view_host());
-    if (!shell_window) {
+    AppWindow* app_window =
+        registry->GetAppWindowForRenderViewHost(render_view_host());
+    if (!app_window) {
       error_ = kInvalidCallingPage;
       SendResponse(false);
       return;
     }
-    web_contents = shell_window->web_contents();
+    web_contents = app_window->web_contents();
   } else {
     web_contents = GetAssociatedWebContents();
   }
@@ -667,17 +667,17 @@ void FileSystemChooseEntryFunction::FilesSelected(
   if (is_directory_) {
     // Get the WebContents for the app window to be the parent window of the
     // confirmation dialog if necessary.
-    apps::ShellWindowRegistry* registry =
-        apps::ShellWindowRegistry::Get(GetProfile());
+    apps::AppWindowRegistry* registry =
+        apps::AppWindowRegistry::Get(GetProfile());
     DCHECK(registry);
-    ShellWindow* shell_window = registry->GetShellWindowForRenderViewHost(
-        render_view_host());
-    if (!shell_window) {
+    AppWindow* app_window =
+        registry->GetAppWindowForRenderViewHost(render_view_host());
+    if (!app_window) {
       error_ = kInvalidCallingPage;
       SendResponse(false);
       return;
     }
-    content::WebContents* web_contents = shell_window->web_contents();
+    content::WebContents* web_contents = app_window->web_contents();
 
     content::BrowserThread::PostTask(
         content::BrowserThread::FILE,