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

Side by Side Diff: third_party/WebKit/Source/modules/installedapp/InstalledAppController.h

Issue 2571513003: InstalledAppController should use ContextLifecycleObserver instead of DOMWindowProperty (Closed)
Patch Set: temp Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/DOMWindowProperty.h" 8 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "platform/Supplementable.h" 11 #include "platform/Supplementable.h"
12 #include "public/platform/modules/installedapp/WebInstalledAppClient.h" 12 #include "public/platform/modules/installedapp/WebInstalledAppClient.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class WebSecurityOrigin; 16 class WebSecurityOrigin;
17 17
18 class MODULES_EXPORT InstalledAppController final 18 class MODULES_EXPORT InstalledAppController final
19 : public GarbageCollectedFinalized<InstalledAppController>, 19 : public GarbageCollectedFinalized<InstalledAppController>,
20 public Supplement<LocalFrame>, 20 public Supplement<LocalFrame>,
21 public DOMWindowProperty { 21 public ContextLifecycleObserver {
22 USING_GARBAGE_COLLECTED_MIXIN(InstalledAppController); 22 USING_GARBAGE_COLLECTED_MIXIN(InstalledAppController);
23 WTF_MAKE_NONCOPYABLE(InstalledAppController); 23 WTF_MAKE_NONCOPYABLE(InstalledAppController);
24 24
25 public: 25 public:
26 virtual ~InstalledAppController(); 26 virtual ~InstalledAppController();
27 27
28 void getInstalledApps(const WebSecurityOrigin&, 28 void getInstalledApps(const WebSecurityOrigin&,
29 std::unique_ptr<AppInstalledCallbacks>); 29 std::unique_ptr<AppInstalledCallbacks>);
30 30
31 static void provideTo(LocalFrame&, WebInstalledAppClient*); 31 static void provideTo(LocalFrame&, WebInstalledAppClient*);
32 static InstalledAppController* from(LocalFrame&); 32 static InstalledAppController* from(LocalFrame&);
33 static const char* supplementName(); 33 static const char* supplementName();
34 34
35 DECLARE_VIRTUAL_TRACE(); 35 DECLARE_VIRTUAL_TRACE();
36 36
37 private: 37 private:
38 InstalledAppController(LocalFrame&, WebInstalledAppClient*); 38 InstalledAppController(LocalFrame&, WebInstalledAppClient*);
39 39
40 // Inherited from DOMWindowProperty. 40 // Inherited from ContextLifecycleObserver.
41 void frameDestroyed() override; 41 void contextDestroyed() override;
42 42
43 WebInstalledAppClient* m_client; 43 WebInstalledAppClient* m_client;
44 }; 44 };
45 45
46 } // namespace blink 46 } // namespace blink
47 47
48 #endif // InstalledAppController_h 48 #endif // InstalledAppController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698