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

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

Issue 1318793005: [part 2] Make classes and structures in modules fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 /* 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 24 matching lines...) Expand all
35 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ExceptionState; 39 class ExceptionState;
40 class LocalFrame; 40 class LocalFrame;
41 class Navigator; 41 class Navigator;
42 42
43 class MODULES_EXPORT NavigatorContentUtils final : public NoBaseWillBeGarbageCol lectedFinalized<NavigatorContentUtils>, public WillBeHeapSupplement<LocalFrame> { 43 class MODULES_EXPORT NavigatorContentUtils final : public NoBaseWillBeGarbageCol lectedFinalized<NavigatorContentUtils>, public WillBeHeapSupplement<LocalFrame> {
44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils); 44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils);
45 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(NavigatorContentUtils);
45 public: 46 public:
46 virtual ~NavigatorContentUtils(); 47 virtual ~NavigatorContentUtils();
47 48
48 static NavigatorContentUtils* from(LocalFrame&); 49 static NavigatorContentUtils* from(LocalFrame&);
49 static const char* supplementName(); 50 static const char* supplementName();
50 51
51 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&); 52 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&);
52 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&); 53 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&);
53 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons t String& url, ExceptionState&); 54 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons t String& url, ExceptionState&);
54 55
55 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig atorContentUtilsClient>); 56 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig atorContentUtilsClient>);
56 57
57 DEFINE_INLINE_VIRTUAL_TRACE() { WillBeHeapSupplement<LocalFrame>::trace(visi tor); } 58 DEFINE_INLINE_VIRTUAL_TRACE() { WillBeHeapSupplement<LocalFrame>::trace(visi tor); }
58 59
59 void setClientForTest(PassOwnPtr<NavigatorContentUtilsClient> client) { m_cl ient = client; } 60 void setClientForTest(PassOwnPtr<NavigatorContentUtilsClient> client) { m_cl ient = client; }
60 61
61 private: 62 private:
62 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t) 63 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t)
63 : m_client(client) 64 : m_client(client)
64 { } 65 { }
65 66
66 NavigatorContentUtilsClient* client() { return m_client.get(); } 67 NavigatorContentUtilsClient* client() { return m_client.get(); }
67 68
68 OwnPtr<NavigatorContentUtilsClient> m_client; 69 OwnPtr<NavigatorContentUtilsClient> m_client;
69 }; 70 };
70 71
71 } // namespace blink 72 } // namespace blink
72 73
73 #endif // NavigatorContentUtils_h 74 #endif // NavigatorContentUtils_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/UserMediaController.h ('k') | Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698