Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: content/renderer/installedapp/related_apps_fetcher.h

Issue 2488573002: Refactor getInstalledRelatedApps code and add manifest logic and tests. (Closed)
Patch Set: Use SecurityOrigin, not WebSecurityOrigin. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/installedapp/related_apps_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/installedapp/related_apps_fetcher.h
diff --git a/content/renderer/installedapp/related_apps_fetcher.h b/content/renderer/installedapp/related_apps_fetcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..51d745f7f68aa3a30ab718042bd4893e8db19057
--- /dev/null
+++ b/content/renderer/installedapp/related_apps_fetcher.h
@@ -0,0 +1,50 @@
+// Copyright 2017 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.
+
+#ifndef CONTENT_RENDERER_INSTALLEDAPP_RELATED_APPS_FETCHER_H
+#define CONTENT_RENDERER_INSTALLEDAPP_RELATED_APPS_FETCHER_H
+
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/modules/installedapp/WebRelatedAppsFetcher.h"
+
+namespace content {
+
+struct Manifest;
+struct ManifestDebugInfo;
+class ManifestManager;
+
+class CONTENT_EXPORT RelatedAppsFetcher
+ : public NON_EXPORTED_BASE(blink::WebRelatedAppsFetcher) {
+ public:
+ explicit RelatedAppsFetcher(ManifestManager* manifest_manager);
+ ~RelatedAppsFetcher() override;
+
+ // blink::WebRelatedAppsFetcher overrides:
+ void getManifestRelatedApplications(
+ std::unique_ptr<blink::WebCallbacks<
+ const blink::WebVector<blink::WebRelatedApplication>&,
+ void>> callbacks) override;
+
+ private:
+ // Callback for when the manifest has been fetched, triggered by a call to
+ // getManifestRelatedApplications.
+ void OnGetManifestForRelatedApplications(
+ std::unique_ptr<blink::WebCallbacks<
+ const blink::WebVector<blink::WebRelatedApplication>&,
+ void>> callbacks,
+ const GURL& url,
+ const Manifest& manifest,
+ const ManifestDebugInfo& manifest_debug_info);
+
+ ManifestManager* manifest_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(RelatedAppsFetcher);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_INSTALLEDAPP_RELATED_APPS_FETCHER_H
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/installedapp/related_apps_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698