| 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 InstalledAppController_h | 5 #ifndef InstalledAppController_h |
| 6 #define InstalledAppController_h | 6 #define InstalledAppController_h |
| 7 | 7 |
| 8 #include "core/frame/LocalFrameLifecycleObserver.h" | 8 #include "core/frame/LocalFrameLifecycleObserver.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| 11 #include "public/platform/modules/installedapp/WebInstalledAppClient.h" | 11 #include "public/platform/modules/installedapp/WebInstalledAppClient.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class WebSecurityOrigin; | 15 class WebSecurityOrigin; |
| 16 | 16 |
| 17 class MODULES_EXPORT InstalledAppController final | 17 class MODULES_EXPORT InstalledAppController final |
| 18 : public GarbageCollectedFinalized<InstalledAppController>, public HeapSuppl
ement<LocalFrame>, public LocalFrameLifecycleObserver { | 18 : public GarbageCollectedFinalized<InstalledAppController>, public Supplemen
t<LocalFrame>, public LocalFrameLifecycleObserver { |
| 19 USING_GARBAGE_COLLECTED_MIXIN(InstalledAppController); | 19 USING_GARBAGE_COLLECTED_MIXIN(InstalledAppController); |
| 20 WTF_MAKE_NONCOPYABLE(InstalledAppController); | 20 WTF_MAKE_NONCOPYABLE(InstalledAppController); |
| 21 public: | 21 public: |
| 22 virtual ~InstalledAppController(); | 22 virtual ~InstalledAppController(); |
| 23 | 23 |
| 24 void getInstalledApps(const WebSecurityOrigin&, WebPassOwnPtr<AppInstalledCa
llbacks>); | 24 void getInstalledApps(const WebSecurityOrigin&, WebPassOwnPtr<AppInstalledCa
llbacks>); |
| 25 | 25 |
| 26 static void provideTo(LocalFrame&, WebInstalledAppClient*); | 26 static void provideTo(LocalFrame&, WebInstalledAppClient*); |
| 27 static InstalledAppController* from(LocalFrame&); | 27 static InstalledAppController* from(LocalFrame&); |
| 28 static const char* supplementName(); | 28 static const char* supplementName(); |
| 29 | 29 |
| 30 DECLARE_VIRTUAL_TRACE(); | 30 DECLARE_VIRTUAL_TRACE(); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 InstalledAppController(LocalFrame&, WebInstalledAppClient*); | 33 InstalledAppController(LocalFrame&, WebInstalledAppClient*); |
| 34 | 34 |
| 35 // Inherited from LocalFrameLifecycleObserver. | 35 // Inherited from LocalFrameLifecycleObserver. |
| 36 void willDetachFrameHost() override; | 36 void willDetachFrameHost() override; |
| 37 | 37 |
| 38 WebInstalledAppClient* m_client; | 38 WebInstalledAppClient* m_client; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace blink | 41 } // namespace blink |
| 42 | 42 |
| 43 #endif // InstalledAppController_h | 43 #endif // InstalledAppController_h |
| OLD | NEW |