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 "config.h" | 5 #include "config.h" |
6 #include "webkit/glue/webplugin_impl.h" | 6 #include "webkit/glue/webplugin_impl.h" |
7 | 7 |
8 #include "Cursor.h" | 8 #include "Cursor.h" |
9 #include "Document.h" | 9 #include "Document.h" |
10 #include "DocumentLoader.h" | 10 #include "DocumentLoader.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 first_geometry_update_(true), | 329 first_geometry_update_(true), |
330 mime_type_(mime_type) { | 330 mime_type_(mime_type) { |
331 | 331 |
332 ArrayToVector(arg_count, arg_names, &arg_names_); | 332 ArrayToVector(arg_count, arg_names, &arg_names_); |
333 ArrayToVector(arg_count, arg_values, &arg_values_); | 333 ArrayToVector(arg_count, arg_values, &arg_values_); |
334 } | 334 } |
335 | 335 |
336 WebPluginImpl::~WebPluginImpl() { | 336 WebPluginImpl::~WebPluginImpl() { |
337 } | 337 } |
338 | 338 |
339 void WebPluginImpl::SetWindow(gfx::NativeView window, | 339 bool WebPluginImpl::SetWindow(gfx::NativeView window, |
340 HANDLE pump_messages_event) { | 340 HANDLE pump_messages_event) { |
341 if (window) { | 341 if (window) { |
342 DCHECK(!windowless_); // Make sure not called twice. | 342 DCHECK(!windowless_); // Make sure not called twice. |
343 window_ = window; | 343 window_ = window; |
344 } else { | 344 } else { |
345 DCHECK(!window_); // Make sure not called twice. | 345 DCHECK(!window_); // Make sure not called twice. |
346 windowless_ = true; | 346 windowless_ = true; |
347 } | 347 } |
| 348 |
| 349 return true; |
348 } | 350 } |
349 | 351 |
350 bool WebPluginImpl::CompleteURL(const std::string& url_in, | 352 bool WebPluginImpl::CompleteURL(const std::string& url_in, |
351 std::string* url_out) { | 353 std::string* url_out) { |
352 if (!frame() || !frame()->document()) { | 354 if (!frame() || !frame()->document()) { |
353 NOTREACHED(); | 355 NOTREACHED(); |
354 return false; | 356 return false; |
355 } | 357 } |
356 | 358 |
357 WebCore::String str(webkit_glue::StdStringToString(url_in)); | 359 WebCore::String str(webkit_glue::StdStringToString(url_in)); |
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 client_index = clients_.erase(client_index); | 1427 client_index = clients_.erase(client_index); |
1426 if (resource_client) | 1428 if (resource_client) |
1427 resource_client->DidFail(); | 1429 resource_client->DidFail(); |
1428 } | 1430 } |
1429 | 1431 |
1430 // This needs to be called now and not in the destructor since the | 1432 // This needs to be called now and not in the destructor since the |
1431 // webframe_ might not be valid anymore. | 1433 // webframe_ might not be valid anymore. |
1432 webframe_->set_plugin_delegate(NULL); | 1434 webframe_->set_plugin_delegate(NULL); |
1433 webframe_ = NULL; | 1435 webframe_ = NULL; |
1434 } | 1436 } |
OLD | NEW |