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

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

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 years, 1 month 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/glue/plugins/pepper_file_chooser.cc ('k') | webkit/glue/plugins/plugin_lib.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) 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "webkit/glue/plugins/plugin_instance.h" 7 #include "webkit/glue/plugins/plugin_instance.h"
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void* notify_data; 84 void* notify_data;
85 GetNotifyData(notify_id, &notify, &notify_data); 85 GetNotifyData(notify_id, &notify, &notify_data);
86 PluginStreamUrl* stream = new PluginStreamUrl( 86 PluginStreamUrl* stream = new PluginStreamUrl(
87 resource_id, url, this, notify, notify_data); 87 resource_id, url, this, notify, notify_data);
88 88
89 AddStream(stream); 89 AddStream(stream);
90 return stream; 90 return stream;
91 } 91 }
92 92
93 void PluginInstance::AddStream(PluginStream* stream) { 93 void PluginInstance::AddStream(PluginStream* stream) {
94 open_streams_.push_back(stream); 94 open_streams_.push_back(make_scoped_refptr(stream));
95 } 95 }
96 96
97 void PluginInstance::RemoveStream(PluginStream* stream) { 97 void PluginInstance::RemoveStream(PluginStream* stream) {
98 if (in_close_streams_) 98 if (in_close_streams_)
99 return; 99 return;
100 100
101 std::vector<scoped_refptr<PluginStream> >::iterator stream_index; 101 std::vector<scoped_refptr<PluginStream> >::iterator stream_index;
102 for (stream_index = open_streams_.begin(); 102 for (stream_index = open_streams_.begin();
103 stream_index != open_streams_.end(); ++stream_index) { 103 stream_index != open_streams_.end(); ++stream_index) {
104 if (*stream_index == stream) { 104 if (*stream_index == stream) {
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 *notify = true; 623 *notify = true;
624 *notify_data = iter->second; 624 *notify_data = iter->second;
625 pending_requests_.erase(iter); 625 pending_requests_.erase(iter);
626 } else { 626 } else {
627 *notify = false; 627 *notify = false;
628 *notify_data = NULL; 628 *notify_data = NULL;
629 } 629 }
630 } 630 }
631 631
632 } // namespace NPAPI 632 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_file_chooser.cc ('k') | webkit/glue/plugins/plugin_lib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698