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

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

Issue 2688483002: ClientRedirect reload should use FrameLoadTypeReloadMainResource (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | 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 /* 1 /*
2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
3 * Copyright (C) 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public 6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details. 13 * Lesser General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301 USA 18 * MA 02110-1301 USA
19 */ 19 */
20 20
21 #include "modules/plugins/DOMPluginArray.h" 21 #include "modules/plugins/DOMPluginArray.h"
22 22
23 #include "core/frame/LocalFrame.h" 23 #include "core/frame/LocalFrame.h"
24 #include "core/page/Page.h" 24 #include "core/page/Page.h"
25 #include "platform/RuntimeEnabledFeatures.h"
25 #include "platform/plugins/PluginData.h" 26 #include "platform/plugins/PluginData.h"
26 #include "wtf/Vector.h" 27 #include "wtf/Vector.h"
27 #include "wtf/text/AtomicString.h" 28 #include "wtf/text/AtomicString.h"
28 29
29 namespace blink { 30 namespace blink {
30 31
31 DOMPluginArray::DOMPluginArray(LocalFrame* frame) : ContextClient(frame) {} 32 DOMPluginArray::DOMPluginArray(LocalFrame* frame) : ContextClient(frame) {}
32 33
33 DEFINE_TRACE(DOMPluginArray) { 34 DEFINE_TRACE(DOMPluginArray) {
34 ContextClient::trace(visitor); 35 ContextClient::trace(visitor);
(...skipping 25 matching lines...) Expand all
60 if (plugins[i].name == propertyName) 61 if (plugins[i].name == propertyName)
61 return DOMPlugin::create(data, frame(), i); 62 return DOMPlugin::create(data, frame(), i);
62 } 63 }
63 return nullptr; 64 return nullptr;
64 } 65 }
65 66
66 void DOMPluginArray::refresh(bool reload) { 67 void DOMPluginArray::refresh(bool reload) {
67 if (!frame()) 68 if (!frame())
68 return; 69 return;
69 Page::refreshPlugins(); 70 Page::refreshPlugins();
70 if (reload) 71 if (reload) {
71 frame()->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirect); 72 frame()->reload(RuntimeEnabledFeatures::fasterLocationReloadEnabled()
73 ? FrameLoadTypeReloadMainResource
74 : FrameLoadTypeReload,
75 ClientRedirectPolicy::ClientRedirect);
76 }
72 } 77 }
73 78
74 PluginData* DOMPluginArray::pluginData() const { 79 PluginData* DOMPluginArray::pluginData() const {
75 if (!frame()) 80 if (!frame())
76 return nullptr; 81 return nullptr;
77 return frame()->pluginData(); 82 return frame()->pluginData();
78 } 83 }
79 84
80 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698