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

Side by Side Diff: third_party/WebKit/Source/platform/plugins/PluginData.h

Issue 2157883002: Cache the mimeTypes and plugins DOM objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated after dry run. Created 4 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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 class PLATFORM_EXPORT PluginData : public RefCounted<PluginData> { 52 class PLATFORM_EXPORT PluginData : public RefCounted<PluginData> {
53 WTF_MAKE_NONCOPYABLE(PluginData); 53 WTF_MAKE_NONCOPYABLE(PluginData);
54 public: 54 public:
55 static PassRefPtr<PluginData> create(SecurityOrigin* mainFrameOrigin) { retu rn adoptRef(new PluginData(mainFrameOrigin)); } 55 static PassRefPtr<PluginData> create(SecurityOrigin* mainFrameOrigin) { retu rn adoptRef(new PluginData(mainFrameOrigin)); }
56 56
57 const Vector<PluginInfo>& plugins() const { return m_plugins; } 57 const Vector<PluginInfo>& plugins() const { return m_plugins; }
58 const Vector<MimeClassInfo>& mimes() const { return m_mimes; } 58 const Vector<MimeClassInfo>& mimes() const { return m_mimes; }
59 const Vector<size_t>& mimePluginIndices() const { return m_mimePluginIndices ; } 59 const Vector<size_t>& mimePluginIndices() const { return m_mimePluginIndices ; }
60 const SecurityOrigin* origin() const { return m_mainFrameOrigin.get(); } 60 const SecurityOrigin* origin() const { return m_mainFrameOrigin.get(); }
61 double modified() const { return m_modified; }
61 62
62 bool supportsMimeType(const String& mimeType) const; 63 bool supportsMimeType(const String& mimeType) const;
63 String pluginNameForMimeType(const String& mimeType) const; 64 String pluginNameForMimeType(const String& mimeType) const;
64 65
65 // refreshBrowserSidePluginCache doesn't update existent instances of 66 // refreshBrowserSidePluginCache doesn't update existent instances of
66 // PluginData. 67 // PluginData.
67 static void refreshBrowserSidePluginCache(); 68 static void refreshBrowserSidePluginCache();
68 69
69 private: 70 private:
70 explicit PluginData(SecurityOrigin* mainFrameOrigin); 71 explicit PluginData(SecurityOrigin* mainFrameOrigin);
71 const PluginInfo* pluginInfoForMimeType(const String& mimeType) const; 72 const PluginInfo* pluginInfoForMimeType(const String& mimeType) const;
72 73
73 Vector<PluginInfo> m_plugins; 74 Vector<PluginInfo> m_plugins;
74 Vector<MimeClassInfo> m_mimes; 75 Vector<MimeClassInfo> m_mimes;
75 Vector<size_t> m_mimePluginIndices; 76 Vector<size_t> m_mimePluginIndices;
76 RefPtr<SecurityOrigin> m_mainFrameOrigin; 77 RefPtr<SecurityOrigin> m_mainFrameOrigin;
78 double m_modified;
77 }; 79 };
78 80
79 } // namespace blink 81 } // namespace blink
80 82
81 #endif 83 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698