OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin_process_host.h" | 5 #include "content/browser/plugin_process_host.h" |
6 | 6 |
7 #if defined(OS_WIN) && !defined(USE_AURA) | 7 #if defined(OS_WIN) && !defined(USE_AURA) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
10 #include <utility> // for pair<> | 10 #include <utility> // for pair<> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 #endif | 160 #endif |
161 // Cancel all pending and sent requests. | 161 // Cancel all pending and sent requests. |
162 CancelRequests(); | 162 CancelRequests(); |
163 } | 163 } |
164 | 164 |
165 bool PluginProcessHost::Init(const webkit::WebPluginInfo& info, | 165 bool PluginProcessHost::Init(const webkit::WebPluginInfo& info, |
166 const std::string& locale) { | 166 const std::string& locale) { |
167 info_ = info; | 167 info_ = info; |
168 set_name(info_.name); | 168 set_name(info_.name); |
169 set_version(info_.version); | |
170 | 169 |
171 if (!CreateChannel()) | 170 if (!CreateChannel()) |
172 return false; | 171 return false; |
173 | 172 |
174 // Build command line for plugin. When we have a plugin launcher, we can't | 173 // Build command line for plugin. When we have a plugin launcher, we can't |
175 // allow "self" on linux and we need the real file path. | 174 // allow "self" on linux and we need the real file path. |
176 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 175 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
177 CommandLine::StringType plugin_launcher = | 176 CommandLine::StringType plugin_launcher = |
178 browser_command_line.GetSwitchValueNative(switches::kPluginLauncher); | 177 browser_command_line.GetSwitchValueNative(switches::kPluginLauncher); |
179 | 178 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 } | 415 } |
417 | 416 |
418 void PluginProcessHost::OnChannelCreated( | 417 void PluginProcessHost::OnChannelCreated( |
419 const IPC::ChannelHandle& channel_handle) { | 418 const IPC::ChannelHandle& channel_handle) { |
420 Client* client = sent_requests_.front(); | 419 Client* client = sent_requests_.front(); |
421 | 420 |
422 if (client) | 421 if (client) |
423 client->OnChannelOpened(channel_handle); | 422 client->OnChannelOpened(channel_handle); |
424 sent_requests_.pop_front(); | 423 sent_requests_.pop_front(); |
425 } | 424 } |
OLD | NEW |