| 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 | 6 |
| 7 #include "Cursor.h" | 7 #include "Cursor.h" |
| 8 #include "Document.h" | 8 #include "Document.h" |
| 9 #include "DocumentLoader.h" | 9 #include "DocumentLoader.h" |
| 10 #include "Event.h" | 10 #include "Event.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 mime_type_(mime_type), | 381 mime_type_(mime_type), |
| 382 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { | 382 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { |
| 383 | 383 |
| 384 ArrayToVector(arg_count, arg_names, &arg_names_); | 384 ArrayToVector(arg_count, arg_names, &arg_names_); |
| 385 ArrayToVector(arg_count, arg_values, &arg_values_); | 385 ArrayToVector(arg_count, arg_values, &arg_values_); |
| 386 } | 386 } |
| 387 | 387 |
| 388 WebPluginImpl::~WebPluginImpl() { | 388 WebPluginImpl::~WebPluginImpl() { |
| 389 } | 389 } |
| 390 | 390 |
| 391 gfx::PluginWindowHandle WebPluginImpl::CreatePluginContainer() { |
| 392 WebCore::Frame* frame = element_->document()->frame(); |
| 393 WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame); |
| 394 WebViewImpl* webview = webframe->GetWebViewImpl(); |
| 395 if (!webview->delegate()) |
| 396 return 0; |
| 397 return webview->delegate()->CreatePluginContainer(); |
| 398 } |
| 399 |
| 391 void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { | 400 void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { |
| 392 if (window) { | 401 if (window) { |
| 393 DCHECK(!windowless_); // Make sure not called twice. | 402 DCHECK(!windowless_); // Make sure not called twice. |
| 394 window_ = window; | 403 window_ = window; |
| 395 } else { | 404 } else { |
| 396 DCHECK(!window_); // Make sure not called twice. | 405 DCHECK(!window_); // Make sure not called twice. |
| 397 windowless_ = true; | 406 windowless_ = true; |
| 398 } | 407 } |
| 399 } | 408 } |
| 400 | 409 |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 | 1428 |
| 1420 WebPluginGeometry move; | 1429 WebPluginGeometry move; |
| 1421 move.window = window_; | 1430 move.window = window_; |
| 1422 move.window_rect = gfx::Rect(); | 1431 move.window_rect = gfx::Rect(); |
| 1423 move.clip_rect = gfx::Rect(); | 1432 move.clip_rect = gfx::Rect(); |
| 1424 move.rects_valid = false; | 1433 move.rects_valid = false; |
| 1425 move.visible = widget_->isVisible(); | 1434 move.visible = widget_->isVisible(); |
| 1426 | 1435 |
| 1427 webview->delegate()->DidMove(webview, move); | 1436 webview->delegate()->DidMove(webview, move); |
| 1428 } | 1437 } |
| OLD | NEW |