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

Side by Side Diff: webkit/glue/plugins/plugin_stream_url.cc

Issue 5794003: Deinline even more destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/glue/plugins/plugin_stream_url.h" 5 #include "webkit/glue/plugins/plugin_stream_url.h"
6 6
7 #include "net/http/http_response_headers.h" 7 #include "net/http/http_response_headers.h"
8 #include "webkit/glue/plugins/plugin_host.h" 8 #include "webkit/glue/plugins/plugin_host.h"
9 #include "webkit/glue/plugins/plugin_instance.h" 9 #include "webkit/glue/plugins/plugin_instance.h"
10 #include "webkit/glue/plugins/plugin_lib.h" 10 #include "webkit/glue/plugins/plugin_lib.h"
(...skipping 21 matching lines...) Expand all
32 bool PluginStreamUrl::Close(NPReason reason) { 32 bool PluginStreamUrl::Close(NPReason reason) {
33 // Protect the stream against it being destroyed or the whole plugin instance 33 // Protect the stream against it being destroyed or the whole plugin instance
34 // being destroyed within the destroy stream handler. 34 // being destroyed within the destroy stream handler.
35 scoped_refptr<PluginStream> protect(this); 35 scoped_refptr<PluginStream> protect(this);
36 CancelRequest(); 36 CancelRequest();
37 bool result = PluginStream::Close(reason); 37 bool result = PluginStream::Close(reason);
38 instance()->RemoveStream(this); 38 instance()->RemoveStream(this);
39 return result; 39 return result;
40 } 40 }
41 41
42 webkit_glue::WebPluginResourceClient* PluginStreamUrl::AsResourceClient() {
43 return static_cast<webkit_glue::WebPluginResourceClient*>(this);
44 }
45
42 void PluginStreamUrl::WillSendRequest(const GURL& url, int http_status_code) { 46 void PluginStreamUrl::WillSendRequest(const GURL& url, int http_status_code) {
43 if (notify_needed()) { 47 if (notify_needed()) {
44 // If the plugin participates in HTTP url redirect handling then notify it. 48 // If the plugin participates in HTTP url redirect handling then notify it.
45 if (net::HttpResponseHeaders::IsRedirectResponseCode(http_status_code) && 49 if (net::HttpResponseHeaders::IsRedirectResponseCode(http_status_code) &&
46 instance()->handles_url_redirects()) { 50 instance()->handles_url_redirects()) {
47 pending_redirect_url_ = url.spec(); 51 pending_redirect_url_ = url.spec();
48 instance()->NPP_URLRedirectNotify(url.spec().c_str(), http_status_code, 52 instance()->NPP_URLRedirectNotify(url.spec().c_str(), http_status_code,
49 notify_data()); 53 notify_data());
50 return; 54 return;
51 } 55 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void PluginStreamUrl::CancelRequest() { 121 void PluginStreamUrl::CancelRequest() {
118 if (id_ > 0) { 122 if (id_ > 0) {
119 if (instance()->webplugin()) { 123 if (instance()->webplugin()) {
120 instance()->webplugin()->CancelResource(id_); 124 instance()->webplugin()->CancelResource(id_);
121 } 125 }
122 id_ = 0; 126 id_ = 0;
123 } 127 }
124 } 128 }
125 129
126 } // namespace NPAPI 130 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_stream_url.h ('k') | webkit/glue/plugins/webplugin_2d_device_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698