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) | 7 #if defined(OS_WIN) |
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 BrowserThread::UI, FROM_HERE, | 153 BrowserThread::UI, FROM_HERE, |
154 NewRunnableFunction(base::mac::SetCursorVisibility, | 154 NewRunnableFunction(base::mac::SetCursorVisibility, |
155 true)); | 155 true)); |
156 } | 156 } |
157 } | 157 } |
158 #endif | 158 #endif |
159 // Cancel all pending and sent requests. | 159 // Cancel all pending and sent requests. |
160 CancelRequests(); | 160 CancelRequests(); |
161 } | 161 } |
162 | 162 |
163 bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info, | 163 bool PluginProcessHost::Init(const webkit::WebPluginInfo& info, |
164 const std::string& locale) { | 164 const std::string& locale) { |
165 info_ = info; | 165 info_ = info; |
166 set_name(info_.name); | 166 set_name(info_.name); |
167 set_version(info_.version); | 167 set_version(info_.version); |
168 | 168 |
169 if (!CreateChannel()) | 169 if (!CreateChannel()) |
170 return false; | 170 return false; |
171 | 171 |
172 // Build command line for plugin. When we have a plugin launcher, we can't | 172 // Build command line for plugin. When we have a plugin launcher, we can't |
173 // allow "self" on linux and we need the real file path. | 173 // allow "self" on linux and we need the real file path. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 354 } |
355 } | 355 } |
356 | 356 |
357 void PluginProcessHost::OnChannelCreated( | 357 void PluginProcessHost::OnChannelCreated( |
358 const IPC::ChannelHandle& channel_handle) { | 358 const IPC::ChannelHandle& channel_handle) { |
359 Client* client = sent_requests_.front(); | 359 Client* client = sent_requests_.front(); |
360 | 360 |
361 client->OnChannelOpened(channel_handle); | 361 client->OnChannelOpened(channel_handle); |
362 sent_requests_.pop(); | 362 sent_requests_.pop(); |
363 } | 363 } |
OLD | NEW |