| 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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } | 593 } |
| 594 | 594 |
| 595 WebRect WebPagePopupImpl::WindowRectInScreen() const { | 595 WebRect WebPagePopupImpl::WindowRectInScreen() const { |
| 596 return WidgetClient()->WindowRect(); | 596 return WidgetClient()->WindowRect(); |
| 597 } | 597 } |
| 598 | 598 |
| 599 // WebPagePopup ---------------------------------------------------------------- | 599 // WebPagePopup ---------------------------------------------------------------- |
| 600 | 600 |
| 601 WebPagePopup* WebPagePopup::Create(WebWidgetClient* client) { | 601 WebPagePopup* WebPagePopup::Create(WebWidgetClient* client) { |
| 602 if (!client) | 602 if (!client) |
| 603 CRASH(); | 603 IMMEDIATE_CRASH(); |
| 604 // A WebPagePopupImpl instance usually has two references. | 604 // A WebPagePopupImpl instance usually has two references. |
| 605 // - One owned by the instance itself. It represents the visible widget. | 605 // - One owned by the instance itself. It represents the visible widget. |
| 606 // - One owned by a WebViewBase. It's released when the WebViewBase ask the | 606 // - One owned by a WebViewBase. It's released when the WebViewBase ask the |
| 607 // WebPagePopupImpl to close. | 607 // WebPagePopupImpl to close. |
| 608 // We need them because the closing operation is asynchronous and the widget | 608 // We need them because the closing operation is asynchronous and the widget |
| 609 // can be closed while the WebViewBase is unaware of it. | 609 // can be closed while the WebViewBase is unaware of it. |
| 610 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); | 610 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); |
| 611 } | 611 } |
| 612 | 612 |
| 613 } // namespace blink | 613 } // namespace blink |
| OLD | NEW |