| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/plugin/webplugin_delegate_stub.h" | 5 #include "chrome/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 "chrome/common/child_process_logging.h" | 10 #include "chrome/common/child_process_logging.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 140 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 141 FilePath path = FilePath::FromWStringHack( | 141 FilePath path = FilePath::FromWStringHack( |
| 142 command_line.GetSwitchValue(switches::kPluginPath)); | 142 command_line.GetSwitchValue(switches::kPluginPath)); |
| 143 | 143 |
| 144 | 144 |
| 145 gfx::PluginWindowHandle parent = NULL; | 145 gfx::PluginWindowHandle parent = NULL; |
| 146 #if defined(OS_WIN) | 146 #if defined(OS_WIN) |
| 147 parent = gfx::NativeViewFromId(params.containing_window); | 147 parent = gfx::NativeViewFromId(params.containing_window); |
| 148 #elif defined(OS_LINUX) | 148 #elif defined(OS_LINUX) |
| 149 PluginThread::current()->Send(new PluginProcessHostMsg_MapNativeViewId( | 149 // This code is disabled, See issue 17110. |
| 150 params.containing_window, &parent)); | 150 // The problem is that the XID can change at arbitrary times (e.g. when the |
| 151 // tab is detached then reattached), so we need to be able to track these |
| 152 // changes, and let the PluginInstance know. |
| 153 // PluginThread::current()->Send(new PluginProcessHostMsg_MapNativeViewId( |
| 154 // params.containing_window, &parent)); |
| 151 #endif | 155 #endif |
| 152 delegate_ = WebPluginDelegate::Create(path, mime_type_, parent); | 156 delegate_ = WebPluginDelegate::Create(path, mime_type_, parent); |
| 153 | 157 |
| 154 if (delegate_) { | 158 if (delegate_) { |
| 155 webplugin_ = new WebPluginProxy( | 159 webplugin_ = new WebPluginProxy( |
| 156 channel_, instance_id_, delegate_, page_url_); | 160 channel_, instance_id_, delegate_, page_url_); |
| 157 #if defined(OS_WIN) | 161 #if defined(OS_WIN) |
| 158 if (!webplugin_->SetModalDialogEvent(params.modal_dialog_event)) | 162 if (!webplugin_->SetModalDialogEvent(params.modal_dialog_event)) |
| 159 return; | 163 return; |
| 160 #endif | 164 #endif |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 params.notify_data, | 377 params.notify_data, |
| 374 params.stream); | 378 params.stream); |
| 375 webplugin_->OnResourceCreated(params.resource_id, resource_client); | 379 webplugin_->OnResourceCreated(params.resource_id, resource_client); |
| 376 } | 380 } |
| 377 | 381 |
| 378 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, | 382 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, |
| 379 bool notify_needed, | 383 bool notify_needed, |
| 380 intptr_t notify_data) { | 384 intptr_t notify_data) { |
| 381 delegate_->URLRequestRouted(url, notify_needed, notify_data); | 385 delegate_->URLRequestRouted(url, notify_needed, notify_data); |
| 382 } | 386 } |
| OLD | NEW |