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

Side by Side Diff: Source/modules/navigatorcontentutils/NavigatorContentUtils.h

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * Copyright (C) 2012, Samsung Electronics. All rights reserved. 3 * Copyright (C) 2012, Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 10 matching lines...) Expand all
21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
24 * DAMAGE. 24 * DAMAGE.
25 */ 25 */
26 26
27 #ifndef NavigatorContentUtils_h 27 #ifndef NavigatorContentUtils_h
28 #define NavigatorContentUtils_h 28 #define NavigatorContentUtils_h
29 29
30 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h" 30 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
31 #include "platform/RefCountedSupplement.h" 31 #include "platform/Supplementable.h"
32 #include "platform/heap/Handle.h"
32 #include "wtf/PassRefPtr.h" 33 #include "wtf/PassRefPtr.h"
33 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
34 35
35 namespace WebCore { 36 namespace WebCore {
36 37
37 class ExceptionState; 38 class ExceptionState;
38 class Navigator; 39 class Navigator;
39 class Page; 40 class Page;
40 41
41 class NavigatorContentUtils FINAL : public Supplement<Page> { 42 class NavigatorContentUtils FINAL : public NoBaseWillBeGarbageCollectedFinalized <NavigatorContentUtils>, public WillBeHeapSupplement<Page> {
43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils);
42 public: 44 public:
43 virtual ~NavigatorContentUtils(); 45 virtual ~NavigatorContentUtils();
44 46
45 static NavigatorContentUtils* from(Page&); 47 static NavigatorContentUtils* from(Page&);
46 static const char* supplementName(); 48 static const char* supplementName();
47 49
48 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&); 50 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&);
49 51
50 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&); 52 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&);
51 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons t String& url, ExceptionState&); 53 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons t String& url, ExceptionState&);
52 54
53 static PassOwnPtr<NavigatorContentUtils> create(PassOwnPtr<NavigatorContentU tilsClient>); 55 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig atorContentUtilsClient>);
54 56
55 virtual void trace(Visitor*) OVERRIDE { } 57 virtual void trace(Visitor*) OVERRIDE { }
56 58
57 private: 59 private:
58 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t) 60 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t)
59 : m_client(client) 61 : m_client(client)
60 { } 62 { }
61 63
62 NavigatorContentUtilsClient* client() { return m_client.get(); } 64 NavigatorContentUtilsClient* client() { return m_client.get(); }
63 65
64 OwnPtr<NavigatorContentUtilsClient> m_client; 66 OwnPtr<NavigatorContentUtilsClient> m_client;
65 }; 67 };
66 68
67 } // namespace WebCore 69 } // namespace WebCore
68 70
69 #endif // NavigatorContentUtils_h 71 #endif // NavigatorContentUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698