| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 WTF_MAKE_NONCOPYABLE(PagePopupChromeClient); | 69 WTF_MAKE_NONCOPYABLE(PagePopupChromeClient); |
| 70 WTF_MAKE_FAST_ALLOCATED(PagePopupChromeClient); | 70 WTF_MAKE_FAST_ALLOCATED(PagePopupChromeClient); |
| 71 | 71 |
| 72 public: | 72 public: |
| 73 explicit PagePopupChromeClient(WebPagePopupImpl* popup) | 73 explicit PagePopupChromeClient(WebPagePopupImpl* popup) |
| 74 : m_popup(popup) | 74 : m_popup(popup) |
| 75 { | 75 { |
| 76 ASSERT(m_popup->widgetClient()); | 76 ASSERT(m_popup->widgetClient()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 virtual void setWindowRectInternal(const IntRect& rect) override | 79 virtual void setWindowRect(const IntRect& rect) override |
| 80 { | 80 { |
| 81 m_popup->m_windowRectInScreen = rect; | 81 m_popup->m_windowRectInScreen = rect; |
| 82 m_popup->widgetClient()->setWindowRect(m_popup->m_windowRectInScreen); | 82 m_popup->widgetClient()->setWindowRect(m_popup->m_windowRectInScreen); |
| 83 } | 83 } |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 virtual void closeWindowSoon() override | 86 virtual void closeWindowSoon() override |
| 87 { | 87 { |
| 88 m_popup->closePopup(); | 88 m_popup->closePopup(); |
| 89 } | 89 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 Document* document = toLocalFrame(m_page->mainFrame())->document(); | 293 Document* document = toLocalFrame(m_page->mainFrame())->document(); |
| 294 if (!document) | 294 if (!document) |
| 295 return 0; | 295 return 0; |
| 296 AXObjectCache* cache = document->axObjectCache(); | 296 AXObjectCache* cache = document->axObjectCache(); |
| 297 ASSERT(cache); | 297 ASSERT(cache); |
| 298 return toAXObjectCacheImpl(cache)->getOrCreate(document->layoutView()); | 298 return toAXObjectCacheImpl(cache)->getOrCreate(document->layoutView()); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void WebPagePopupImpl::setWindowRect(const IntRect& rect) | 301 void WebPagePopupImpl::setWindowRect(const IntRect& rect) |
| 302 { | 302 { |
| 303 m_chromeClient->setWindowRectInternal(rect); | 303 m_chromeClient->setWindowRect(rect); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void WebPagePopupImpl::setRootGraphicsLayer(GraphicsLayer* layer) | 306 void WebPagePopupImpl::setRootGraphicsLayer(GraphicsLayer* layer) |
| 307 { | 307 { |
| 308 m_rootGraphicsLayer = layer; | 308 m_rootGraphicsLayer = layer; |
| 309 m_rootLayer = layer ? layer->platformLayer() : 0; | 309 m_rootLayer = layer ? layer->platformLayer() : 0; |
| 310 | 310 |
| 311 setIsAcceleratedCompositingActive(layer); | 311 setIsAcceleratedCompositingActive(layer); |
| 312 if (m_layerTreeView) { | 312 if (m_layerTreeView) { |
| 313 if (m_rootLayer) { | 313 if (m_rootLayer) { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 // A WebPagePopupImpl instance usually has two references. | 520 // A WebPagePopupImpl instance usually has two references. |
| 521 // - One owned by the instance itself. It represents the visible widget. | 521 // - One owned by the instance itself. It represents the visible widget. |
| 522 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 522 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 523 // WebPagePopupImpl to close. | 523 // WebPagePopupImpl to close. |
| 524 // We need them because the closing operation is asynchronous and the widget | 524 // We need them because the closing operation is asynchronous and the widget |
| 525 // can be closed while the WebViewImpl is unaware of it. | 525 // can be closed while the WebViewImpl is unaware of it. |
| 526 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 526 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 527 } | 527 } |
| 528 | 528 |
| 529 } // namespace blink | 529 } // namespace blink |
| OLD | NEW |