| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
| 38 #include "core/loader/EmptyClients.h" | 38 #include "core/loader/EmptyClients.h" |
| 39 #include "core/loader/FrameLoadRequest.h" | 39 #include "core/loader/FrameLoadRequest.h" |
| 40 #include "core/page/Chrome.h" | 40 #include "core/page/Chrome.h" |
| 41 #include "core/page/DOMWindowPagePopup.h" | 41 #include "core/page/DOMWindowPagePopup.h" |
| 42 #include "core/page/EventHandler.h" | 42 #include "core/page/EventHandler.h" |
| 43 #include "core/page/FocusController.h" | 43 #include "core/page/FocusController.h" |
| 44 #include "core/page/Page.h" | 44 #include "core/page/Page.h" |
| 45 #include "core/page/PagePopupClient.h" | 45 #include "core/page/PagePopupClient.h" |
| 46 #include "platform/TraceEvent.h" | 46 #include "platform/TraceEvent.h" |
| 47 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" |
| 47 #include "public/platform/WebCursorInfo.h" | 48 #include "public/platform/WebCursorInfo.h" |
| 48 #include "public/web/WebAXObject.h" | 49 #include "public/web/WebAXObject.h" |
| 49 #include "public/web/WebFrameClient.h" | 50 #include "public/web/WebFrameClient.h" |
| 50 #include "public/web/WebViewClient.h" | 51 #include "public/web/WebViewClient.h" |
| 51 #include "public/web/WebWidgetClient.h" | 52 #include "public/web/WebWidgetClient.h" |
| 52 #include "web/WebInputEventConversion.h" | 53 #include "web/WebInputEventConversion.h" |
| 53 #include "web/WebLocalFrameImpl.h" | 54 #include "web/WebLocalFrameImpl.h" |
| 54 #include "web/WebSettingsImpl.h" | 55 #include "web/WebSettingsImpl.h" |
| 55 #include "web/WebViewImpl.h" | 56 #include "web/WebViewImpl.h" |
| 56 | 57 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 418 |
| 418 // m_widgetClient might be 0 because this widget might be already closed. | 419 // m_widgetClient might be 0 because this widget might be already closed. |
| 419 if (m_widgetClient) { | 420 if (m_widgetClient) { |
| 420 // closeWidgetSoon() will call this->close() later. | 421 // closeWidgetSoon() will call this->close() later. |
| 421 m_widgetClient->closeWidgetSoon(); | 422 m_widgetClient->closeWidgetSoon(); |
| 422 } | 423 } |
| 423 | 424 |
| 424 m_popupClient->didClosePopup(); | 425 m_popupClient->didClosePopup(); |
| 425 } | 426 } |
| 426 | 427 |
| 428 void WebPagePopupImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCal
lback* callback) |
| 429 { |
| 430 ASSERT(isAcceleratedCompositingActive()); |
| 431 m_layerTreeView->compositeAndReadbackAsync(callback); |
| 432 } |
| 433 |
| 434 WebPoint WebPagePopupImpl::positionRelativeToOwner() |
| 435 { |
| 436 WebRect windowRect = m_webView->client()->rootWindowRect(); |
| 437 return WebPoint(m_windowRectInScreen.x - windowRect.x, m_windowRectInScreen.
y - windowRect.y); |
| 438 } |
| 439 |
| 427 // WebPagePopup ---------------------------------------------------------------- | 440 // WebPagePopup ---------------------------------------------------------------- |
| 428 | 441 |
| 429 WebPagePopup* WebPagePopup::create(WebWidgetClient* client) | 442 WebPagePopup* WebPagePopup::create(WebWidgetClient* client) |
| 430 { | 443 { |
| 431 if (!client) | 444 if (!client) |
| 432 CRASH(); | 445 CRASH(); |
| 433 // A WebPagePopupImpl instance usually has two references. | 446 // A WebPagePopupImpl instance usually has two references. |
| 434 // - One owned by the instance itself. It represents the visible widget. | 447 // - One owned by the instance itself. It represents the visible widget. |
| 435 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 448 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 436 // WebPagePopupImpl to close. | 449 // WebPagePopupImpl to close. |
| 437 // We need them because the closing operation is asynchronous and the widget | 450 // We need them because the closing operation is asynchronous and the widget |
| 438 // can be closed while the WebViewImpl is unaware of it. | 451 // can be closed while the WebViewImpl is unaware of it. |
| 439 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 452 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 440 } | 453 } |
| 441 | 454 |
| 442 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |