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

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl.cc

Issue 15007012: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing includes. Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/plugins/npapi/webplugin_delegate_impl.h" 5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return; 178 return;
179 #if !defined(OS_WIN) // See SetFocus above. 179 #if !defined(OS_WIN) // See SetFocus above.
180 SetPluginHasFocus(containing_view_has_focus_ && has_webkit_focus_); 180 SetPluginHasFocus(containing_view_has_focus_ && has_webkit_focus_);
181 #endif 181 #endif
182 } 182 }
183 183
184 NPObject* WebPluginDelegateImpl::GetPluginScriptableObject() { 184 NPObject* WebPluginDelegateImpl::GetPluginScriptableObject() {
185 return instance_->GetPluginScriptableObject(); 185 return instance_->GetPluginScriptableObject();
186 } 186 }
187 187
188 NPP WebPluginDelegateImpl::GetPluginNPP() {
189 return instance_->npp();
190 }
191
188 bool WebPluginDelegateImpl::GetFormValue(base::string16* value) { 192 bool WebPluginDelegateImpl::GetFormValue(base::string16* value) {
189 return instance_->GetFormValue(value); 193 return instance_->GetFormValue(value);
190 } 194 }
191 195
192 void WebPluginDelegateImpl::DidFinishLoadWithReason(const GURL& url, 196 void WebPluginDelegateImpl::DidFinishLoadWithReason(const GURL& url,
193 NPReason reason, 197 NPReason reason,
194 int notify_id) { 198 int notify_id) {
195 if (quirks_ & PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS && 199 if (quirks_ & PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS &&
196 reason == NPRES_NETWORK_ERR) { 200 reason == NPRES_NETWORK_ERR) {
197 // Flash needs this or otherwise it unloads the launching swf object. 201 // Flash needs this or otherwise it unloads the launching swf object.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 resource_id, url, std::string(), notify_id); 295 resource_id, url, std::string(), notify_id);
292 } 296 }
293 297
294 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( 298 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient(
295 unsigned long resource_id, int range_request_id) { 299 unsigned long resource_id, int range_request_id) {
296 return instance()->GetRangeRequest(range_request_id); 300 return instance()->GetRangeRequest(range_request_id);
297 } 301 }
298 302
299 } // namespace npapi 303 } // namespace npapi
300 } // namespace webkit 304 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698