OLD | NEW |
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/browser/ppapi_plugin_process_host.h" | 5 #include "content/browser/ppapi_plugin_process_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 return; | 171 return; |
172 } | 172 } |
173 } | 173 } |
174 // Note: It's possible that the plugin process has already been deleted by | 174 // Note: It's possible that the plugin process has already been deleted by |
175 // the time this message is received. For example, it could have crashed. | 175 // the time this message is received. For example, it could have crashed. |
176 // That's OK, we can just ignore this message. | 176 // That's OK, we can just ignore this message. |
177 } | 177 } |
178 | 178 |
179 // static | 179 // static |
180 void PpapiPluginProcessHost::FindByName( | 180 void PpapiPluginProcessHost::FindByName( |
181 const string16& name, | 181 const base::string16& name, |
182 std::vector<PpapiPluginProcessHost*>* hosts) { | 182 std::vector<PpapiPluginProcessHost*>* hosts) { |
183 for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) { | 183 for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) { |
184 if (iter->process_.get() && iter->process_->GetData().name == name) | 184 if (iter->process_.get() && iter->process_->GetData().name == name) |
185 hosts->push_back(*iter); | 185 hosts->push_back(*iter); |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 bool PpapiPluginProcessHost::Send(IPC::Message* message) { | 189 bool PpapiPluginProcessHost::Send(IPC::Message* message) { |
190 return process_->Send(message); | 190 return process_->Send(message); |
191 } | 191 } |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 // sent_requests_ queue should be the one that the plugin just created. | 426 // sent_requests_ queue should be the one that the plugin just created. |
427 Client* client = sent_requests_.front(); | 427 Client* client = sent_requests_.front(); |
428 sent_requests_.pop(); | 428 sent_requests_.pop(); |
429 | 429 |
430 const ChildProcessData& data = process_->GetData(); | 430 const ChildProcessData& data = process_->GetData(); |
431 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 431 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
432 data.id); | 432 data.id); |
433 } | 433 } |
434 | 434 |
435 } // namespace content | 435 } // namespace content |
OLD | NEW |