| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 { | 73 { |
| 74 ASSERT(m_popup->widgetClient()); | 74 ASSERT(m_popup->widgetClient()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 virtual void closeWindowSoon() override | 78 virtual void closeWindowSoon() override |
| 79 { | 79 { |
| 80 m_popup->closePopup(); | 80 m_popup->closePopup(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 virtual FloatRect windowRect() override | 83 virtual IntRect windowRect() override |
| 84 { | 84 { |
| 85 return FloatRect(m_popup->m_windowRectInScreen.x, m_popup->m_windowRectI
nScreen.y, m_popup->m_windowRectInScreen.width, m_popup->m_windowRectInScreen.he
ight); | 85 return IntRect(m_popup->m_windowRectInScreen.x, m_popup->m_windowRectInS
creen.y, m_popup->m_windowRectInScreen.width, m_popup->m_windowRectInScreen.heig
ht); |
| 86 } | 86 } |
| 87 | 87 |
| 88 virtual void setWindowRect(const FloatRect& rect) override | 88 virtual void setWindowRect(const IntRect& rect) override |
| 89 { | 89 { |
| 90 m_popup->m_windowRectInScreen = IntRect(rect); | 90 m_popup->m_windowRectInScreen = rect; |
| 91 m_popup->widgetClient()->setWindowRect(m_popup->m_windowRectInScreen); | 91 m_popup->widgetClient()->setWindowRect(m_popup->m_windowRectInScreen); |
| 92 } | 92 } |
| 93 | 93 |
| 94 virtual IntRect rootViewToScreen(const IntRect& rect) const override | 94 virtual IntRect rootViewToScreen(const IntRect& rect) const override |
| 95 { | 95 { |
| 96 IntRect rectInScreen(rect); | 96 IntRect rectInScreen(rect); |
| 97 rectInScreen.move(m_popup->m_windowRectInScreen.x, m_popup->m_windowRect
InScreen.y); | 97 rectInScreen.move(m_popup->m_windowRectInScreen.x, m_popup->m_windowRect
InScreen.y); |
| 98 return rectInScreen; | 98 return rectInScreen; |
| 99 } | 99 } |
| 100 | 100 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 129 virtual WebScreenInfo screenInfo() const override | 129 virtual WebScreenInfo screenInfo() const override |
| 130 { | 130 { |
| 131 return m_popup->m_webView->client() ? m_popup->m_webView->client()->scre
enInfo() : WebScreenInfo(); | 131 return m_popup->m_webView->client() ? m_popup->m_webView->client()->scre
enInfo() : WebScreenInfo(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 virtual void* webView() const override | 134 virtual void* webView() const override |
| 135 { | 135 { |
| 136 return m_popup->m_webView; | 136 return m_popup->m_webView; |
| 137 } | 137 } |
| 138 | 138 |
| 139 virtual FloatSize minimumWindowSize() const override | 139 virtual IntSize minimumWindowSize() const override |
| 140 { | 140 { |
| 141 return FloatSize(0, 0); | 141 return IntSize(0, 0); |
| 142 } | 142 } |
| 143 | 143 |
| 144 virtual void setCursor(const Cursor& cursor) override | 144 virtual void setCursor(const Cursor& cursor) override |
| 145 { | 145 { |
| 146 if (m_popup->m_webView->client()) | 146 if (m_popup->m_webView->client()) |
| 147 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor))
; | 147 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor))
; |
| 148 } | 148 } |
| 149 | 149 |
| 150 virtual void needTouchEvents(bool needsTouchEvents) override | 150 virtual void needTouchEvents(bool needsTouchEvents) override |
| 151 { | 151 { |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 // A WebPagePopupImpl instance usually has two references. | 465 // A WebPagePopupImpl instance usually has two references. |
| 466 // - One owned by the instance itself. It represents the visible widget. | 466 // - One owned by the instance itself. It represents the visible widget. |
| 467 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 467 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 468 // WebPagePopupImpl to close. | 468 // WebPagePopupImpl to close. |
| 469 // We need them because the closing operation is asynchronous and the widget | 469 // We need them because the closing operation is asynchronous and the widget |
| 470 // can be closed while the WebViewImpl is unaware of it. | 470 // can be closed while the WebViewImpl is unaware of it. |
| 471 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 471 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 472 } | 472 } |
| 473 | 473 |
| 474 } // namespace blink | 474 } // namespace blink |
| OLD | NEW |