| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 NavigatorInstalledApp_h | 5 #ifndef NavigatorInstalledApp_h |
| 6 #define NavigatorInstalledApp_h | 6 #define NavigatorInstalledApp_h |
| 7 | 7 |
| 8 #include "core/dom/ContextLifecycleObserver.h" | |
| 9 #include "core/frame/Navigator.h" | 8 #include "core/frame/Navigator.h" |
| 10 #include "platform/Supplementable.h" | 9 #include "platform/Supplementable.h" |
| 11 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 12 #include "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 class Document; | 15 class Document; |
| 17 class Navigator; | 16 class Navigator; |
| 18 class ScriptPromise; | 17 class ScriptPromise; |
| 19 class ScriptState; | 18 class ScriptState; |
| 20 class InstalledAppController; | 19 class InstalledAppController; |
| 21 | 20 |
| 22 class NavigatorInstalledApp final | 21 class NavigatorInstalledApp final |
| 23 : public GarbageCollected<NavigatorInstalledApp>, | 22 : public GarbageCollected<NavigatorInstalledApp>, |
| 24 public Supplement<Navigator>, | 23 public Supplement<Navigator> { |
| 25 public ContextClient { | |
| 26 USING_GARBAGE_COLLECTED_MIXIN(NavigatorInstalledApp); | 24 USING_GARBAGE_COLLECTED_MIXIN(NavigatorInstalledApp); |
| 27 | 25 |
| 28 public: | 26 public: |
| 29 static NavigatorInstalledApp* from(Document&); | 27 static NavigatorInstalledApp* from(Document&); |
| 30 static NavigatorInstalledApp& from(Navigator&); | 28 static NavigatorInstalledApp& from(Navigator&); |
| 31 | 29 |
| 32 static ScriptPromise getInstalledRelatedApps(ScriptState*, Navigator&); | 30 static ScriptPromise getInstalledRelatedApps(ScriptState*, Navigator&); |
| 33 ScriptPromise getInstalledRelatedApps(ScriptState*); | 31 ScriptPromise getInstalledRelatedApps(ScriptState*); |
| 34 | 32 |
| 35 InstalledAppController* controller(); | 33 InstalledAppController* controller(); |
| 36 | 34 |
| 37 DECLARE_VIRTUAL_TRACE(); | 35 DECLARE_VIRTUAL_TRACE(); |
| 38 | 36 |
| 39 private: | 37 private: |
| 40 explicit NavigatorInstalledApp(LocalFrame*); | 38 explicit NavigatorInstalledApp(Navigator&); |
| 41 static const char* supplementName(); | 39 static const char* supplementName(); |
| 42 }; | 40 }; |
| 43 | 41 |
| 44 } // namespace blink | 42 } // namespace blink |
| 45 | 43 |
| 46 #endif // NavigatorInstalledApp_h | 44 #endif // NavigatorInstalledApp_h |
| OLD | NEW |