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

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

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « webkit/plugins/npapi/plugin_stream.h ('k') | webkit/plugins/npapi/plugin_stream_posix.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) 2006-2008 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 // TODO : Support NP_ASFILEONLY mode 5 // TODO : Support NP_ASFILEONLY mode
6 // TODO : Support NP_SEEK mode 6 // TODO : Support NP_SEEK mode
7 // TODO : Support SEEKABLE=true in NewStream 7 // TODO : Support SEEKABLE=true in NewStream
8 8
9 #include "webkit/glue/plugins/plugin_stream.h" 9 #include "webkit/plugins/npapi/plugin_stream.h"
10 10
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "net/base/mime_util.h" 14 #include "net/base/mime_util.h"
15 #include "webkit/glue/plugins/plugin_instance.h" 15 #include "webkit/plugins/npapi/plugin_instance.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 17
18 namespace NPAPI { 18 namespace webkit {
19 namespace npapi {
19 20
20 PluginStream::~PluginStream() { 21 PluginStream::~PluginStream() {
21 // always close our temporary files. 22 // always close our temporary files.
22 CloseTempFile(); 23 CloseTempFile();
23 free(const_cast<char*>(stream_.url)); 24 free(const_cast<char*>(stream_.url));
24 } 25 }
25 26
26 bool PluginStream::Open(const std::string &mime_type, 27 bool PluginStream::Open(const std::string &mime_type,
27 const std::string &headers, 28 const std::string &headers,
28 uint32 length, 29 uint32 length,
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Stream hasn't been closed yet. 238 // Stream hasn't been closed yet.
238 NPError err = instance_->NPP_DestroyStream(&stream_, reason); 239 NPError err = instance_->NPP_DestroyStream(&stream_, reason);
239 DCHECK(err == NPERR_NO_ERROR); 240 DCHECK(err == NPERR_NO_ERROR);
240 } 241 }
241 } 242 }
242 243
243 Notify(reason); 244 Notify(reason);
244 return true; 245 return true;
245 } 246 }
246 247
247 webkit_glue::WebPluginResourceClient* PluginStream::AsResourceClient() { 248 WebPluginResourceClient* PluginStream::AsResourceClient() {
248 return NULL; 249 return NULL;
249 } 250 }
250 251
251 void PluginStream::Notify(NPReason reason) { 252 void PluginStream::Notify(NPReason reason) {
252 if (notify_needed_) { 253 if (notify_needed_) {
253 instance_->NPP_URLNotify(stream_.url, reason, notify_data_); 254 instance_->NPP_URLNotify(stream_.url, reason, notify_data_);
254 notify_needed_ = false; 255 notify_needed_ = false;
255 } 256 }
256 } 257 }
257 258
258 } // namespace NPAPI 259 } // namespace npapi
260 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_stream.h ('k') | webkit/plugins/npapi/plugin_stream_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698