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

Side by Side Diff: content/plugin/webplugin_delegate_stub.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 6 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 "content/plugin/webplugin_delegate_stub.h" 5 #include "content/plugin/webplugin_delegate_stub.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 20 matching lines...) Expand all
31 using webkit::npapi::WebPluginResourceClient; 31 using webkit::npapi::WebPluginResourceClient;
32 32
33 namespace content { 33 namespace content {
34 34
35 static void DestroyWebPluginAndDelegate( 35 static void DestroyWebPluginAndDelegate(
36 base::WeakPtr<NPObjectStub> scriptable_object, 36 base::WeakPtr<NPObjectStub> scriptable_object,
37 webkit::npapi::WebPluginDelegateImpl* delegate, 37 webkit::npapi::WebPluginDelegateImpl* delegate,
38 WebPlugin* webplugin) { 38 WebPlugin* webplugin) {
39 // The plugin may not expect us to try to release the scriptable object 39 // The plugin may not expect us to try to release the scriptable object
40 // after calling NPP_Destroy on the instance, so delete the stub now. 40 // after calling NPP_Destroy on the instance, so delete the stub now.
41 if (scriptable_object) 41 if (scriptable_object.get())
42 scriptable_object->DeleteSoon(); 42 scriptable_object->DeleteSoon();
43 // WebPlugin must outlive WebPluginDelegate. 43 // WebPlugin must outlive WebPluginDelegate.
44 if (delegate) 44 if (delegate)
45 delegate->PluginDestroyed(); 45 delegate->PluginDestroyed();
46 46
47 delete webplugin; 47 delete webplugin;
48 } 48 }
49 49
50 WebPluginDelegateStub::WebPluginDelegateStub( 50 WebPluginDelegateStub::WebPluginDelegateStub(
51 const std::string& mime_type, int instance_id, PluginChannel* channel) : 51 const std::string& mime_type, int instance_id, PluginChannel* channel) :
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 393
394 void WebPluginDelegateStub::OnHTTPRangeRequestReply( 394 void WebPluginDelegateStub::OnHTTPRangeRequestReply(
395 unsigned long resource_id, int range_request_id) { 395 unsigned long resource_id, int range_request_id) {
396 WebPluginResourceClient* resource_client = 396 WebPluginResourceClient* resource_client =
397 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); 397 delegate_->CreateSeekableResourceClient(resource_id, range_request_id);
398 webplugin_->OnResourceCreated(resource_id, resource_client); 398 webplugin_->OnResourceCreated(resource_id, resource_client);
399 } 399 }
400 400
401 } // namespace content 401 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/ppapi_plugin/broker_process_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698