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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 page_url_ = params.page_url; | 153 page_url_ = params.page_url; |
154 GetContentClient()->SetActiveURL(page_url_); | 154 GetContentClient()->SetActiveURL(page_url_); |
155 | 155 |
156 *result = false; | 156 *result = false; |
157 if (params.arg_names.size() != params.arg_values.size()) { | 157 if (params.arg_names.size() != params.arg_values.size()) { |
158 NOTREACHED(); | 158 NOTREACHED(); |
159 return; | 159 return; |
160 } | 160 } |
161 | 161 |
162 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 162 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
163 FilePath path = | 163 base::FilePath path = |
164 command_line.GetSwitchValuePath(switches::kPluginPath); | 164 command_line.GetSwitchValuePath(switches::kPluginPath); |
165 | 165 |
166 webplugin_ = new WebPluginProxy( | 166 webplugin_ = new WebPluginProxy( |
167 channel_, instance_id_, page_url_, params.host_render_view_routing_id); | 167 channel_, instance_id_, page_url_, params.host_render_view_routing_id); |
168 delegate_ = webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type_); | 168 delegate_ = webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type_); |
169 if (delegate_) { | 169 if (delegate_) { |
170 webplugin_->set_delegate(delegate_); | 170 webplugin_->set_delegate(delegate_); |
171 std::vector<std::string> arg_names = params.arg_names; | 171 std::vector<std::string> arg_names = params.arg_names; |
172 std::vector<std::string> arg_values = params.arg_values; | 172 std::vector<std::string> arg_values = params.arg_values; |
173 | 173 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } | 394 } |
395 | 395 |
396 #if defined(OS_MACOSX) | 396 #if defined(OS_MACOSX) |
397 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( | 397 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( |
398 gfx::PluginWindowHandle window) { | 398 gfx::PluginWindowHandle window) { |
399 delegate_->set_windowed_handle(window); | 399 delegate_->set_windowed_handle(window); |
400 } | 400 } |
401 #endif | 401 #endif |
402 | 402 |
403 } // namespace content | 403 } // namespace content |
OLD | NEW |