| 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/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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (params.arg_names.size() != params.arg_values.size()) { | 155 if (params.arg_names.size() != params.arg_values.size()) { |
| 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(OS_WIN) | 165 #if defined(USE_AURA) |
| 166 // Nothing. |
| 167 #elif defined(OS_WIN) |
| 166 parent = gfx::NativeViewFromId(params.containing_window); | 168 parent = gfx::NativeViewFromId(params.containing_window); |
| 167 #elif defined(OS_LINUX) | 169 #elif defined(OS_LINUX) |
| 168 // This code is disabled, See issue 17110. | 170 // This code is disabled, See issue 17110. |
| 169 // The problem is that the XID can change at arbitrary times (e.g. when the | 171 // The problem is that the XID can change at arbitrary times (e.g. when the |
| 170 // tab is detached then reattached), so we need to be able to track these | 172 // tab is detached then reattached), so we need to be able to track these |
| 171 // changes, and let the PluginInstance know. | 173 // changes, and let the PluginInstance know. |
| 172 // PluginThread::current()->Send(new PluginProcessHostMsg_MapNativeViewId( | 174 // PluginThread::current()->Send(new PluginProcessHostMsg_MapNativeViewId( |
| 173 // params.containing_window, &parent)); | 175 // params.containing_window, &parent)); |
| 174 #endif | 176 #endif |
| 175 | 177 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); | 392 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); |
| 391 webplugin_->OnResourceCreated(resource_id, resource_client); | 393 webplugin_->OnResourceCreated(resource_id, resource_client); |
| 392 } | 394 } |
| 393 | 395 |
| 394 #if defined(OS_MACOSX) | 396 #if defined(OS_MACOSX) |
| 395 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( | 397 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( |
| 396 gfx::PluginWindowHandle window) { | 398 gfx::PluginWindowHandle window) { |
| 397 delegate_->set_windowed_handle(window); | 399 delegate_->set_windowed_handle(window); |
| 398 } | 400 } |
| 399 #endif | 401 #endif |
| OLD | NEW |