Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 21 matching lines...) Expand all Loading... | |
| 32 class DOMPlugin; | 32 class DOMPlugin; |
| 33 class LocalFrame; | 33 class LocalFrame; |
| 34 | 34 |
| 35 class DOMMimeType final : public GarbageCollectedFinalized<DOMMimeType>, | 35 class DOMMimeType final : public GarbageCollectedFinalized<DOMMimeType>, |
| 36 public ScriptWrappable, | 36 public ScriptWrappable, |
| 37 public ContextClient { | 37 public ContextClient { |
| 38 USING_GARBAGE_COLLECTED_MIXIN(DOMMimeType); | 38 USING_GARBAGE_COLLECTED_MIXIN(DOMMimeType); |
| 39 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
| 40 | 40 |
| 41 public: | 41 public: |
| 42 static DOMMimeType* Create(PassRefPtr<PluginData> plugin_data, | 42 static DOMMimeType* Create(LocalFrame* frame, |
| 43 LocalFrame* frame, | 43 const MimeClassInfo* mime_class_info) { |
|
tkent
2017/05/25 00:10:31
Make the argument "const MimeClassInfo&" to ensure
lfg
2017/05/25 01:42:40
Done.
| |
| 44 unsigned index) { | 44 return new DOMMimeType(frame, mime_class_info); |
| 45 return new DOMMimeType(std::move(plugin_data), frame, index); | |
| 46 } | 45 } |
| 47 virtual ~DOMMimeType(); | 46 virtual ~DOMMimeType(); |
| 48 | 47 |
| 49 const String& type() const; | 48 const String& type() const; |
| 50 String suffixes() const; | 49 String suffixes() const; |
| 51 const String& description() const; | 50 const String& description() const; |
| 52 DOMPlugin* enabledPlugin() const; | 51 DOMPlugin* enabledPlugin() const; |
| 53 | 52 |
| 54 DECLARE_VIRTUAL_TRACE(); | 53 DECLARE_VIRTUAL_TRACE(); |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 DOMMimeType(PassRefPtr<PluginData>, LocalFrame*, unsigned index); | 56 explicit DOMMimeType(LocalFrame*, const MimeClassInfo*); |
|
tkent
2017/05/25 00:10:32
Do not add |explicit|.
Make the second argument |c
lfg
2017/05/25 01:42:40
Done.
| |
| 58 | 57 |
| 59 const MimeClassInfo& GetMimeClassInfo() const { | 58 Member<const MimeClassInfo> mime_class_info_; |
| 60 return plugin_data_->Mimes()[index_]; | |
| 61 } | |
| 62 | |
| 63 RefPtr<PluginData> plugin_data_; | |
| 64 unsigned index_; | |
| 65 }; | 59 }; |
| 66 | 60 |
| 67 } // namespace blink | 61 } // namespace blink |
| 68 | 62 |
| 69 #endif // DOMMimeType_h | 63 #endif // DOMMimeType_h |
| OLD | NEW |