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

Unified Diff: third_party/WebKit/Source/modules/installedapp/InstalledAppController.h

Issue 2671683002: getInstalledRelatedApps: Add browser-side Mojo service (stub). (Closed)
Patch Set: Added TODO. Created 3 years, 9 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
Index: third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
diff --git a/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h b/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
index ba73fc4917527fb0c66ea84f6ba6d6a99a2ee467..2fd98827c08dee883d5bfcbe4cb99b32a1a09574 100644
--- a/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
+++ b/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
@@ -12,6 +12,8 @@
#include "public/platform/WebVector.h"
#include "public/platform/modules/installedapp/WebRelatedApplication.h"
#include "public/platform/modules/installedapp/WebRelatedAppsFetcher.h"
+#include "public/platform/modules/installedapp/installed_app_provider.mojom-blink.h"
+#include "public/platform/modules/installedapp/related_application.mojom-blink.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
@@ -19,8 +21,6 @@
namespace blink {
-class SecurityOrigin;
-
class MODULES_EXPORT InstalledAppController final
: public GarbageCollectedFinalized<InstalledAppController>,
public Supplement<LocalFrame>,
@@ -31,10 +31,9 @@ class MODULES_EXPORT InstalledAppController final
public:
virtual ~InstalledAppController();
- // Gets a list of related apps from a particular origin's manifest that belong
+ // Gets a list of related apps from the current page's manifest that belong
// to the current underlying platform, and are installed.
- void getInstalledRelatedApps(WTF::RefPtr<SecurityOrigin>,
- std::unique_ptr<AppInstalledCallbacks>);
+ void getInstalledRelatedApps(std::unique_ptr<AppInstalledCallbacks>);
static void provideTo(LocalFrame&, WebRelatedAppsFetcher*);
static InstalledAppController* from(LocalFrame&);
@@ -50,13 +49,19 @@ class MODULES_EXPORT InstalledAppController final
// Inherited from ContextLifecycleObserver.
void contextDestroyed(ExecutionContext*) override;
- // For a given security origin, takes a set of related applications and
- // filters them by those which belong to the current underlying platform, and
- // are actually installed. Passes the filtered list to the callback.
- void filterByInstalledApps(WTF::RefPtr<SecurityOrigin>,
- const WebVector<WebRelatedApplication>&,
+ // Takes a set of related applications and filters them by those which belong
+ // to the current underlying platform, and are actually installed and related
+ // to the current page's origin. Passes the filtered list to the callback.
+ void filterByInstalledApps(const WebVector<WebRelatedApplication>&,
std::unique_ptr<AppInstalledCallbacks>);
+ // Callback from the InstalledAppProvider mojo service.
+ void OnFilterInstalledApps(std::unique_ptr<blink::AppInstalledCallbacks>,
+ WTF::Vector<mojom::blink::RelatedApplicationPtr>);
+
+ // Handle to the InstalledApp mojo service.
+ mojom::blink::InstalledAppProviderPtr m_provider;
+
WebRelatedAppsFetcher* m_relatedAppsFetcher;
};

Powered by Google App Engine
This is Rietveld 408576698