WebApp: Introduce WebApp, WebAppRegistrar and InstallManager entities.
Introduce DesktopPWAsWithoutExtensions command line switch.
A WebApp represents single web app.
WebApp objects are owned by WebAppRegistrar.
WebAppRegistrar is a root entity which is able to add/remove new apps.
Later WebAppRegistrar will be able:
- to iterate over all the registered apps.
- to iterate over various subsets of all registered apps (shortcut apps)
- to survive the browser (and ChromeOS) relaunch (persistence)
InstallManager is an abstract manager to plumb 3-dot menu user installation.
We will evolve its WebAppInstallManager implementation
into comprehensive install manager later.
--enable-features=DesktopPWAsWithoutExtensions will enable off-extensions
implementation for Desktop PWAs.
Bug: 891172, 871116
Change-Id: Iebcbd93cf08eec0f11c7c22dce57ded81a2a2e94
Reviewed-on: https://chromium-review.googlesource.com/c/1275468
Reviewed-by: Ben Wells <[email protected]>
Reviewed-by: Trent Apted <[email protected]>
Commit-Queue: Alexey Baskakov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#599887}
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
new file mode 100644
index 0000000..dd2e1a20
--- /dev/null
+++ b/chrome/browser/web_applications/web_app.cc
@@ -0,0 +1,25 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/web_applications/web_app.h"
+
+namespace web_app {
+
+WebApp::WebApp(const AppId& app_id) : app_id_(app_id) {}
+
+WebApp::~WebApp() = default;
+
+void WebApp::SetName(const std::string& name) {
+ name_ = name;
+}
+
+void WebApp::SetDescription(const std::string& description) {
+ description_ = description;
+}
+
+void WebApp::SetLaunchUrl(const std::string& launch_url) {
+ launch_url_ = launch_url;
+}
+
+} // namespace web_app