| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 explicit PagePopupChromeClient(WebPagePopupImpl* popup) : popup_(popup) { | 83 explicit PagePopupChromeClient(WebPagePopupImpl* popup) : popup_(popup) { |
| 84 DCHECK(popup_->WidgetClient()); | 84 DCHECK(popup_->WidgetClient()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void CloseWindowSoon() override { popup_->ClosePopup(); } | 87 void CloseWindowSoon() override { popup_->ClosePopup(); } |
| 88 | 88 |
| 89 IntRect RootWindowRect() override { return popup_->WindowRectInScreen(); } | 89 IntRect RootWindowRect() override { return popup_->WindowRectInScreen(); } |
| 90 | 90 |
| 91 IntRect ViewportToScreen( | 91 IntRect ViewportToScreen(const IntRect& rect, |
| 92 const IntRect& rect, | 92 const FrameView* frame_view) const override { |
| 93 const FrameViewBase* frame_view_base) const override { | |
| 94 WebRect rect_in_screen(rect); | 93 WebRect rect_in_screen(rect); |
| 95 WebRect window_rect = popup_->WindowRectInScreen(); | 94 WebRect window_rect = popup_->WindowRectInScreen(); |
| 96 popup_->WidgetClient()->ConvertViewportToWindow(&rect_in_screen); | 95 popup_->WidgetClient()->ConvertViewportToWindow(&rect_in_screen); |
| 97 rect_in_screen.x += window_rect.x; | 96 rect_in_screen.x += window_rect.x; |
| 98 rect_in_screen.y += window_rect.y; | 97 rect_in_screen.y += window_rect.y; |
| 99 return rect_in_screen; | 98 return rect_in_screen; |
| 100 } | 99 } |
| 101 | 100 |
| 102 float WindowToViewportScalar(const float scalar_value) const override { | 101 float WindowToViewportScalar(const float scalar_value) const override { |
| 103 WebFloatRect viewport_rect(0, 0, scalar_value, 0); | 102 WebFloatRect viewport_rect(0, 0, scalar_value, 0); |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 // A WebPagePopupImpl instance usually has two references. | 601 // A WebPagePopupImpl instance usually has two references. |
| 603 // - One owned by the instance itself. It represents the visible widget. | 602 // - One owned by the instance itself. It represents the visible widget. |
| 604 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 603 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 605 // WebPagePopupImpl to close. | 604 // WebPagePopupImpl to close. |
| 606 // We need them because the closing operation is asynchronous and the widget | 605 // We need them because the closing operation is asynchronous and the widget |
| 607 // can be closed while the WebViewImpl is unaware of it. | 606 // can be closed while the WebViewImpl is unaware of it. |
| 608 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); | 607 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); |
| 609 } | 608 } |
| 610 | 609 |
| 611 } // namespace blink | 610 } // namespace blink |
| OLD | NEW |