| 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/plugin/webplugin_delegate_stub.h" | 5 #include "content/plugin/webplugin_delegate_stub.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 NOTREACHED(); | 156 NOTREACHED(); |
| 157 return; | 157 return; |
| 158 } | 158 } |
| 159 | 159 |
| 160 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 160 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 161 FilePath path = | 161 FilePath path = |
| 162 command_line.GetSwitchValuePath(switches::kPluginPath); | 162 command_line.GetSwitchValuePath(switches::kPluginPath); |
| 163 | 163 |
| 164 gfx::PluginWindowHandle parent = gfx::kNullPluginWindow; | 164 gfx::PluginWindowHandle parent = gfx::kNullPluginWindow; |
| 165 #if defined(USE_AURA) | 165 #if defined(USE_AURA) |
| 166 #if defined(OS_WIN) |
| 167 // Copy of gfx::NativeViewFromId that's defined without Aura. |
| 168 parent = reinterpret_cast<HWND>(params.containing_window); |
| 169 #else |
| 166 // Nothing. | 170 // Nothing. |
| 171 #endif |
| 167 #elif defined(OS_WIN) | 172 #elif defined(OS_WIN) |
| 168 parent = gfx::NativeViewFromId(params.containing_window); | 173 parent = gfx::NativeViewFromId(params.containing_window); |
| 169 #elif defined(OS_LINUX) | 174 #elif defined(OS_LINUX) |
| 170 // This code is disabled, See issue 17110. | 175 // This code is disabled, See issue 17110. |
| 171 // The problem is that the XID can change at arbitrary times (e.g. when the | 176 // The problem is that the XID can change at arbitrary times (e.g. when the |
| 172 // tab is detached then reattached), so we need to be able to track these | 177 // tab is detached then reattached), so we need to be able to track these |
| 173 // changes, and let the PluginInstance know. | 178 // changes, and let the PluginInstance know. |
| 174 // PluginThread::current()->Send(new PluginProcessHostMsg_MapNativeViewId( | 179 // PluginThread::current()->Send(new PluginProcessHostMsg_MapNativeViewId( |
| 175 // params.containing_window, &parent)); | 180 // params.containing_window, &parent)); |
| 176 #endif | 181 #endif |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); | 412 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); |
| 408 webplugin_->OnResourceCreated(resource_id, resource_client); | 413 webplugin_->OnResourceCreated(resource_id, resource_client); |
| 409 } | 414 } |
| 410 | 415 |
| 411 #if defined(OS_MACOSX) | 416 #if defined(OS_MACOSX) |
| 412 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( | 417 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( |
| 413 gfx::PluginWindowHandle window) { | 418 gfx::PluginWindowHandle window) { |
| 414 delegate_->set_windowed_handle(window); | 419 delegate_->set_windowed_handle(window); |
| 415 } | 420 } |
| 416 #endif | 421 #endif |
| OLD | NEW |