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

Side by Side Diff: third_party/WebKit/Source/modules/push_messaging/PushController.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 PushController_h 5 #ifndef PushController_h
6 #define PushController_h 6 #define PushController_h
7 7
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "wtf/Forward.h" 11 #include "wtf/Forward.h"
12 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
13 #include "wtf/PassOwnPtr.h"
14 13
15 namespace blink { 14 namespace blink {
16 15
17 class WebPushClient; 16 class WebPushClient;
18 17
19 class PushController final : public GarbageCollected<PushController>, public Sup plement<LocalFrame> { 18 class PushController final : public GarbageCollected<PushController>, public Sup plement<LocalFrame> {
20 USING_GARBAGE_COLLECTED_MIXIN(PushController); 19 USING_GARBAGE_COLLECTED_MIXIN(PushController);
21 WTF_MAKE_NONCOPYABLE(PushController); 20 WTF_MAKE_NONCOPYABLE(PushController);
22 public: 21 public:
23 static PushController* create(WebPushClient*); 22 static PushController* create(WebPushClient*);
24 static const char* supplementName(); 23 static const char* supplementName();
25 static PushController* from(LocalFrame* frame) { return static_cast<PushCont roller*>(Supplement<LocalFrame>::from(frame, supplementName())); } 24 static PushController* from(LocalFrame* frame) { return static_cast<PushCont roller*>(Supplement<LocalFrame>::from(frame, supplementName())); }
26 static WebPushClient& clientFrom(LocalFrame*); 25 static WebPushClient& clientFrom(LocalFrame*);
27 26
28 DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<LocalFrame>::trace(visitor); } 27 DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<LocalFrame>::trace(visitor); }
29 28
30 private: 29 private:
31 explicit PushController(WebPushClient*); 30 explicit PushController(WebPushClient*);
32 31
33 WebPushClient* client() const { return m_client; } 32 WebPushClient* client() const { return m_client; }
34 33
35 WebPushClient* m_client; 34 WebPushClient* m_client;
36 }; 35 };
37 36
38 MODULES_EXPORT void providePushControllerTo(LocalFrame&, WebPushClient*); 37 MODULES_EXPORT void providePushControllerTo(LocalFrame&, WebPushClient*);
39 38
40 } // namespace blink 39 } // namespace blink
41 40
42 #endif // PushController_h 41 #endif // PushController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698