| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); | 202 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); |
| 203 pageClients.chromeClient = m_chromeClient.get(); | 203 pageClients.chromeClient = m_chromeClient.get(); |
| 204 | 204 |
| 205 m_page = adoptPtrWillBeNoop(new Page(pageClients)); | 205 m_page = adoptPtrWillBeNoop(new Page(pageClients)); |
| 206 m_page->settings().setScriptEnabled(true); | 206 m_page->settings().setScriptEnabled(true); |
| 207 m_page->settings().setAllowScriptsToCloseWindows(true); | 207 m_page->settings().setAllowScriptsToCloseWindows(true); |
| 208 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); | 208 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); |
| 209 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); | 209 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); |
| 210 | 210 |
| 211 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); | 211 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); |
| 212 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie
nt(); | 212 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClien
t(); |
| 213 RefPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderClient, &m_pag
e->frameHost(), 0); | 213 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient, &m_page->frameHost(), 0); |
| 214 // FIXME: Call frame->setPagePopupOwner with m_popupClient->ownerElement(). | 214 // FIXME: Call frame->setPagePopupOwner with m_popupClient->ownerElement(). |
| 215 frame->setView(FrameView::create(frame.get())); | 215 frame->setView(FrameView::create(frame.get())); |
| 216 frame->init(); | 216 frame->init(); |
| 217 frame->view()->resize(m_popupClient->contentSize()); | 217 frame->view()->resize(m_popupClient->contentSize()); |
| 218 frame->view()->setTransparent(false); | 218 frame->view()->setTransparent(false); |
| 219 | 219 |
| 220 ASSERT(frame->domWindow()); | 220 ASSERT(frame->domWindow()); |
| 221 DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient); | 221 DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient); |
| 222 | 222 |
| 223 RefPtr<SharedBuffer> data = SharedBuffer::create(); | 223 RefPtr<SharedBuffer> data = SharedBuffer::create(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 // A WebPagePopupImpl instance usually has two references. | 401 // A WebPagePopupImpl instance usually has two references. |
| 402 // - One owned by the instance itself. It represents the visible widget. | 402 // - One owned by the instance itself. It represents the visible widget. |
| 403 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 403 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 404 // WebPagePopupImpl to close. | 404 // WebPagePopupImpl to close. |
| 405 // We need them because the closing operation is asynchronous and the widget | 405 // We need them because the closing operation is asynchronous and the widget |
| 406 // can be closed while the WebViewImpl is unaware of it. | 406 // can be closed while the WebViewImpl is unaware of it. |
| 407 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 407 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace blink | 410 } // namespace blink |
| OLD | NEW |