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

Side by Side Diff: Source/core/html/HTMLAppletElement.cpp

Issue 23618022: BrowserPlugin/WebView - Move plugin lifetime to DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2012 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2012 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 RefPtr<Widget> widget; 187 RefPtr<Widget> widget;
188 if (frame->loader().allowPlugins(AboutToInstantiatePlugin)) 188 if (frame->loader().allowPlugins(AboutToInstantiatePlugin))
189 widget = frame->loader().client()->createJavaAppletWidget(roundedIntSize (LayoutSize(contentWidth, contentHeight)), this, baseURL, paramNames, paramValue s); 189 widget = frame->loader().client()->createJavaAppletWidget(roundedIntSize (LayoutSize(contentWidth, contentHeight)), this, baseURL, paramNames, paramValue s);
190 190
191 if (!widget) { 191 if (!widget) {
192 if (!renderer->showsUnavailablePluginIndicator()) 192 if (!renderer->showsUnavailablePluginIndicator())
193 renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::Plugin Missing); 193 renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::Plugin Missing);
194 return; 194 return;
195 } 195 }
196 document().setContainsPlugins(); 196 document().setContainsPlugins();
197 renderer->setWidget(widget); 197 setWidget(widget);
198 } 198 }
199 199
200 bool HTMLAppletElement::canEmbedJava() const 200 bool HTMLAppletElement::canEmbedJava() const
201 { 201 {
202 if (document().isSandboxed(SandboxPlugins)) 202 if (document().isSandboxed(SandboxPlugins))
203 return false; 203 return false;
204 204
205 Settings* settings = document().settings(); 205 Settings* settings = document().settings();
206 if (!settings) 206 if (!settings)
207 return false; 207 return false;
(...skipping 15 matching lines...) Expand all
223 223
224 if (!document().contentSecurityPolicy()->allowObjectFromSource(url) 224 if (!document().contentSecurityPolicy()->allowObjectFromSource(url)
225 || !document().contentSecurityPolicy()->allowPluginType(appletMimeType, appletMimeType, url)) { 225 || !document().contentSecurityPolicy()->allowPluginType(appletMimeType, appletMimeType, url)) {
226 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy); 226 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy);
227 return false; 227 return false;
228 } 228 }
229 return true; 229 return true;
230 } 230 }
231 231
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698