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: third_party/WebKit/Source/modules/plugins/DOMPlugin.h

Issue 2901353002: Move blink::PluginData, blink::PluginInfo, blink::MimeTypeInfo to oilpan heap. (Closed)
Patch Set: Created 3 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 /* 1 /*
2 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 2 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 11 matching lines...) Expand all
22 22
23 #include "core/dom/ContextLifecycleObserver.h" 23 #include "core/dom/ContextLifecycleObserver.h"
24 #include "modules/plugins/DOMMimeType.h" 24 #include "modules/plugins/DOMMimeType.h"
25 #include "platform/bindings/ScriptWrappable.h" 25 #include "platform/bindings/ScriptWrappable.h"
26 #include "platform/heap/Handle.h" 26 #include "platform/heap/Handle.h"
27 #include "platform/wtf/Forward.h" 27 #include "platform/wtf/Forward.h"
28 #include "platform/wtf/RefPtr.h" 28 #include "platform/wtf/RefPtr.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class PluginData;
33
34 class DOMPlugin final : public GarbageCollectedFinalized<DOMPlugin>, 32 class DOMPlugin final : public GarbageCollectedFinalized<DOMPlugin>,
35 public ScriptWrappable, 33 public ScriptWrappable,
36 public ContextClient { 34 public ContextClient {
37 USING_GARBAGE_COLLECTED_MIXIN(DOMPlugin); 35 USING_GARBAGE_COLLECTED_MIXIN(DOMPlugin);
38 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
39 37
40 public: 38 public:
41 static DOMPlugin* Create(PluginData* plugin_data, 39 static DOMPlugin* Create(LocalFrame* frame, const PluginInfo* plugin_info) {
tkent 2017/05/25 00:10:32 Make the second argument |const PluginInfo&| to en
lfg 2017/05/25 01:42:40 Done.
42 LocalFrame* frame, 40 return new DOMPlugin(frame, plugin_info);
43 unsigned index) {
44 return new DOMPlugin(plugin_data, frame, index);
45 } 41 }
46 virtual ~DOMPlugin(); 42 virtual ~DOMPlugin();
47 43
48 String name() const; 44 String name() const;
49 String filename() const; 45 String filename() const;
50 String description() const; 46 String description() const;
51 47
52 unsigned length() const; 48 unsigned length() const;
53 49
54 DOMMimeType* item(unsigned index); 50 DOMMimeType* item(unsigned index);
55 DOMMimeType* namedItem(const AtomicString& property_name); 51 DOMMimeType* namedItem(const AtomicString& property_name);
56 52
57 DECLARE_VIRTUAL_TRACE(); 53 DECLARE_VIRTUAL_TRACE();
58 54
59 private: 55 private:
60 DOMPlugin(PluginData*, LocalFrame*, unsigned index); 56 explicit DOMPlugin(LocalFrame*, const PluginInfo*);
tkent 2017/05/25 00:10:32 Do not add |explicit|. Make the second argument |c
lfg 2017/05/25 01:42:40 Done.
61 57
62 const PluginInfo& GetPluginInfo() const { 58 Member<const PluginInfo> plugin_info_;
63 return plugin_data_->Plugins()[index_];
64 }
65
66 RefPtr<PluginData> plugin_data_;
67 unsigned index_;
68 }; 59 };
69 60
70 } // namespace blink 61 } // namespace blink
71 62
72 #endif // DOMPlugin_h 63 #endif // DOMPlugin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698