OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebInstalledAppClient_h | 5 #ifndef WebRelatedAppsFetcher_h |
6 #define WebInstalledAppClient_h | 6 #define WebRelatedAppsFetcher_h |
7 | 7 |
8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
9 #include "public/platform/WebSecurityOrigin.h" | 9 #include "public/platform/WebSecurityOrigin.h" |
10 #include "public/platform/WebVector.h" | 10 #include "public/platform/WebVector.h" |
11 #include "public/platform/modules/installedapp/WebRelatedApplication.h" | 11 #include "public/platform/modules/installedapp/WebRelatedApplication.h" |
12 | 12 |
| 13 #include <memory> |
| 14 |
13 namespace blink { | 15 namespace blink { |
14 | 16 |
15 using AppInstalledCallbacks = | 17 using AppInstalledCallbacks = |
16 WebCallbacks<const WebVector<WebRelatedApplication>&, void>; | 18 WebCallbacks<const WebVector<WebRelatedApplication>&, void>; |
17 | 19 |
18 class WebInstalledAppClient { | 20 class WebRelatedAppsFetcher { |
19 public: | 21 public: |
20 virtual ~WebInstalledAppClient() {} | 22 virtual ~WebRelatedAppsFetcher() {} |
21 | 23 |
22 // Takes ownership of the AppInstalledCallbacks. | 24 // Gets the list of related applications from the web frame's manifest. |
23 virtual void getInstalledRelatedApps( | 25 virtual void getManifestRelatedApplications( |
24 const WebSecurityOrigin&, | |
25 std::unique_ptr<AppInstalledCallbacks>) = 0; | 26 std::unique_ptr<AppInstalledCallbacks>) = 0; |
26 }; | 27 }; |
27 | 28 |
28 } // namespace blink | 29 } // namespace blink |
29 | 30 |
30 #endif // WebInstalledAppClient_h | 31 #endif // WebRelatedAppsFetcher_h |
OLD | NEW |