Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 BrowserThread::PostTask( | 95 BrowserThread::PostTask( |
| 96 BrowserThread::UI, FROM_HERE, | 96 BrowserThread::UI, FROM_HERE, |
| 97 NewRunnableFunction(ReparentPluginWindowHelper, window, parent)); | 97 NewRunnableFunction(ReparentPluginWindowHelper, window, parent)); |
| 98 } | 98 } |
| 99 #endif // defined(OS_WIN) | 99 #endif // defined(OS_WIN) |
| 100 | 100 |
| 101 #if defined(TOOLKIT_USES_GTK) | 101 #if defined(TOOLKIT_USES_GTK) |
| 102 void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id, | 102 void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id, |
| 103 gfx::PluginWindowHandle* output) { | 103 gfx::PluginWindowHandle* output) { |
| 104 *output = 0; | 104 *output = 0; |
| 105 #if !defined(USE_AURA) | |
|
oshima
2011/09/19 15:52:39
I think this method isn't necessary for aura.
| |
| 105 GtkNativeViewManager::GetInstance()->GetXIDForId(output, id); | 106 GtkNativeViewManager::GetInstance()->GetXIDForId(output, id); |
| 107 #endif | |
| 106 } | 108 } |
| 107 #endif // defined(TOOLKIT_USES_GTK) | 109 #endif // defined(TOOLKIT_USES_GTK) |
| 108 | 110 |
| 109 PluginProcessHost::PluginProcessHost() | 111 PluginProcessHost::PluginProcessHost() |
| 110 : BrowserChildProcessHost(PLUGIN_PROCESS) | 112 : BrowserChildProcessHost(PLUGIN_PROCESS) |
| 111 #if defined(OS_MACOSX) | 113 #if defined(OS_MACOSX) |
| 112 , plugin_cursor_visible_(true) | 114 , plugin_cursor_visible_(true) |
| 113 #endif | 115 #endif |
| 114 { | 116 { |
| 115 } | 117 } |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 } | 412 } |
| 411 | 413 |
| 412 void PluginProcessHost::OnChannelCreated( | 414 void PluginProcessHost::OnChannelCreated( |
| 413 const IPC::ChannelHandle& channel_handle) { | 415 const IPC::ChannelHandle& channel_handle) { |
| 414 Client* client = sent_requests_.front(); | 416 Client* client = sent_requests_.front(); |
| 415 | 417 |
| 416 if (client) | 418 if (client) |
| 417 client->OnChannelOpened(channel_handle); | 419 client->OnChannelOpened(channel_handle); |
| 418 sent_requests_.pop_front(); | 420 sent_requests_.pop_front(); |
| 419 } | 421 } |
| OLD | NEW |