Commit 8c2fa775 authored by Jay Harris's avatar Jay Harris Committed by Commit Bot

Adds file handling to WebApps.

Enables file handling in non-extension based web apps.

Bug: 938103
Change-Id: I2610e5712c556f03104c95d27a06cfd137b801db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1824525Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Commit-Queue: Jay Harris <harrisjay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699633}
parent 5c98f425
......@@ -115,4 +115,5 @@ INSTANTIATE_TEST_SUITE_P(
WebAppFileHandlingBrowserTest,
::testing::Values(
web_app::ControllerType::kHostedAppController,
web_app::ControllerType::kUnifiedControllerWithBookmarkApp));
web_app::ControllerType::kUnifiedControllerWithBookmarkApp,
web_app::ControllerType::kUnifiedControllerWithWebApp));
......@@ -13,7 +13,9 @@
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "chrome/browser/web_launch/web_launch_files_helper.h"
#include "content/public/browser/render_view_host.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
namespace web_app {
......@@ -70,6 +72,12 @@ content::WebContents* ShowWebApplicationWindow(
browser->window()->Show();
web_contents->SetInitialFocus();
if (base::FeatureList::IsEnabled(blink::features::kFileHandlingAPI)) {
web_launch::WebLaunchFilesHelper::SetLaunchPaths(web_contents, launch_url,
params.launch_files);
}
return web_contents;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment