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

Side by Side Diff: third_party/WebKit/Source/modules/plugins/NavigatorPlugins.cpp

Issue 2618573003: Remove ContextClient from NavigatorPlugins (Closed)
Patch Set: temp Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/plugins/NavigatorPlugins.h" 5 #include "modules/plugins/NavigatorPlugins.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "core/frame/Navigator.h" 8 #include "core/frame/Navigator.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "modules/plugins/DOMMimeTypeArray.h" 10 #include "modules/plugins/DOMMimeTypeArray.h"
11 #include "modules/plugins/DOMPluginArray.h" 11 #include "modules/plugins/DOMPluginArray.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 NavigatorPlugins::NavigatorPlugins(Navigator& navigator) 15 NavigatorPlugins::NavigatorPlugins(Navigator& navigator)
16 : ContextClient(navigator.frame()) {} 16 : Supplement<Navigator>(navigator) {}
17 17
18 // static 18 // static
19 NavigatorPlugins& NavigatorPlugins::from(Navigator& navigator) { 19 NavigatorPlugins& NavigatorPlugins::from(Navigator& navigator) {
20 NavigatorPlugins* supplement = toNavigatorPlugins(navigator); 20 NavigatorPlugins* supplement = toNavigatorPlugins(navigator);
21 if (!supplement) { 21 if (!supplement) {
22 supplement = new NavigatorPlugins(navigator); 22 supplement = new NavigatorPlugins(navigator);
23 provideTo(navigator, supplementName(), supplement); 23 provideTo(navigator, supplementName(), supplement);
24 } 24 }
25 return *supplement; 25 return *supplement;
26 } 26 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DOMMimeTypeArray* NavigatorPlugins::mimeTypes(LocalFrame* frame) const { 60 DOMMimeTypeArray* NavigatorPlugins::mimeTypes(LocalFrame* frame) const {
61 if (!m_mimeTypes) 61 if (!m_mimeTypes)
62 m_mimeTypes = DOMMimeTypeArray::create(frame); 62 m_mimeTypes = DOMMimeTypeArray::create(frame);
63 return m_mimeTypes.get(); 63 return m_mimeTypes.get();
64 } 64 }
65 65
66 DEFINE_TRACE(NavigatorPlugins) { 66 DEFINE_TRACE(NavigatorPlugins) {
67 visitor->trace(m_plugins); 67 visitor->trace(m_plugins);
68 visitor->trace(m_mimeTypes); 68 visitor->trace(m_mimeTypes);
69 Supplement<Navigator>::trace(visitor); 69 Supplement<Navigator>::trace(visitor);
70 ContextClient::trace(visitor);
71 } 70 }
72 71
73 } // namespace blink 72 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/plugins/NavigatorPlugins.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698