| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { | 391 void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { |
| 392 if (window) { | 392 if (window) { |
| 393 DCHECK(!windowless_); // Make sure not called twice. | 393 DCHECK(!windowless_); // Make sure not called twice. |
| 394 window_ = window; | 394 window_ = window; |
| 395 } else { | 395 } else { |
| 396 DCHECK(!window_); // Make sure not called twice. | 396 DCHECK(!window_); // Make sure not called twice. |
| 397 windowless_ = true; | 397 windowless_ = true; |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) { |
| 402 WebCore::Frame* frame = element_->document()->frame(); |
| 403 WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame); |
| 404 WebViewImpl* webview = webframe->GetWebViewImpl(); |
| 405 if (!webview->delegate()) |
| 406 return; |
| 407 webview->delegate()->WillDestroyPluginWindow(window); |
| 408 } |
| 409 |
| 401 bool WebPluginImpl::CompleteURL(const std::string& url_in, | 410 bool WebPluginImpl::CompleteURL(const std::string& url_in, |
| 402 std::string* url_out) { | 411 std::string* url_out) { |
| 403 if (!frame() || !frame()->document()) { | 412 if (!frame() || !frame()->document()) { |
| 404 NOTREACHED(); | 413 NOTREACHED(); |
| 405 return false; | 414 return false; |
| 406 } | 415 } |
| 407 | 416 |
| 408 WebCore::String str(webkit_glue::StdStringToString(url_in)); | 417 WebCore::String str(webkit_glue::StdStringToString(url_in)); |
| 409 WebCore::String url = frame()->document()->completeURL(str); | 418 WebCore::String url = frame()->document()->completeURL(str); |
| 410 std::wstring wurl = webkit_glue::StringToStdWString(url); | 419 std::wstring wurl = webkit_glue::StringToStdWString(url); |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 | 1419 |
| 1411 WebPluginGeometry move; | 1420 WebPluginGeometry move; |
| 1412 move.window = window_; | 1421 move.window = window_; |
| 1413 move.window_rect = gfx::Rect(); | 1422 move.window_rect = gfx::Rect(); |
| 1414 move.clip_rect = gfx::Rect(); | 1423 move.clip_rect = gfx::Rect(); |
| 1415 move.rects_valid = false; | 1424 move.rects_valid = false; |
| 1416 move.visible = widget_->isVisible(); | 1425 move.visible = widget_->isVisible(); |
| 1417 | 1426 |
| 1418 webview->delegate()->DidMove(webview, move); | 1427 webview->delegate()->DidMove(webview, move); |
| 1419 } | 1428 } |
| OLD | NEW |