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

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

Issue 18808004: Refactoring: Extract DocumentInit for capture Document construction parameter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed webkit_unit_tests build failure. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/PluginDocument.h ('k') | Source/core/html/TextDocument.h » ('j') | 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 PluginView* PluginDocumentParser::pluginView() const 150 PluginView* PluginDocumentParser::pluginView() const
151 { 151 {
152 if (Widget* widget = static_cast<PluginDocument*>(document())->pluginWidget( )) { 152 if (Widget* widget = static_cast<PluginDocument*>(document())->pluginWidget( )) {
153 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); 153 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer());
154 return static_cast<PluginView*>(widget); 154 return static_cast<PluginView*>(widget);
155 } 155 }
156 return 0; 156 return 0;
157 } 157 }
158 158
159 PluginDocument::PluginDocument(Frame* frame, const KURL& url) 159 PluginDocument::PluginDocument(const DocumentInit& initializer)
160 : HTMLDocument(frame, url, PluginDocumentClass) 160 : HTMLDocument(initializer, PluginDocumentClass)
161 , m_shouldLoadPluginManually(true) 161 , m_shouldLoadPluginManually(true)
162 { 162 {
163 setCompatibilityMode(QuirksMode); 163 setCompatibilityMode(QuirksMode);
164 lockCompatibilityMode(); 164 lockCompatibilityMode();
165 } 165 }
166 166
167 PassRefPtr<DocumentParser> PluginDocument::createParser() 167 PassRefPtr<DocumentParser> PluginDocument::createParser()
168 { 168 {
169 return PluginDocumentParser::create(this); 169 return PluginDocumentParser::create(this);
170 } 170 }
(...skipping 25 matching lines...) Expand all
196 // with how many times we call beforeload on object elements. <rdar://proble m/8441094>. 196 // with how many times we call beforeload on object elements. <rdar://proble m/8441094>.
197 if (!shouldLoadPluginManually()) 197 if (!shouldLoadPluginManually())
198 return; 198 return;
199 199
200 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); 200 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader();
201 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc umentLoader->request())); 201 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc umentLoader->request()));
202 setShouldLoadPluginManually(false); 202 setShouldLoadPluginManually(false);
203 } 203 }
204 204
205 } 205 }
OLDNEW
« no previous file with comments | « Source/core/html/PluginDocument.h ('k') | Source/core/html/TextDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698