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

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

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « webkit/plugins/npapi/plugin_lib.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 bool should_load = PlatformInitialize(); 97 bool should_load = PlatformInitialize();
98 98
99 plugin_url_ = url.spec(); 99 plugin_url_ = url.spec();
100 100
101 return should_load; 101 return should_load;
102 } 102 }
103 103
104 void WebPluginDelegateImpl::DestroyInstance() { 104 void WebPluginDelegateImpl::DestroyInstance() {
105 if (instance_ && (instance_->npp()->ndata != NULL)) { 105 if (instance_.get() && (instance_->npp()->ndata != NULL)) {
106 // Shutdown all streams before destroying so that 106 // Shutdown all streams before destroying so that
107 // no streams are left "in progress". Need to do 107 // no streams are left "in progress". Need to do
108 // this before calling set_web_plugin(NULL) because the 108 // this before calling set_web_plugin(NULL) because the
109 // instance uses the helper to do the download. 109 // instance uses the helper to do the download.
110 instance_->CloseStreams(); 110 instance_->CloseStreams();
111 111
112 window_.window = NULL; 112 window_.window = NULL;
113 if (creation_succeeded_ && 113 if (creation_succeeded_ &&
114 !(quirks_ & PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY)) { 114 !(quirks_ & PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY)) {
115 instance_->NPP_SetWindow(&window_); 115 instance_->NPP_SetWindow(&window_);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 resource_id, url, std::string(), notify_id); 297 resource_id, url, std::string(), notify_id);
298 } 298 }
299 299
300 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( 300 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient(
301 unsigned long resource_id, int range_request_id) { 301 unsigned long resource_id, int range_request_id) {
302 return instance()->GetRangeRequest(range_request_id); 302 return instance()->GetRangeRequest(range_request_id);
303 } 303 }
304 304
305 } // namespace npapi 305 } // namespace npapi
306 } // namespace webkit 306 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_lib.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698