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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return true; | 238 return true; |
239 } | 239 } |
240 | 240 |
241 bool WebPagePopupImpl::initializePage() | 241 bool WebPagePopupImpl::initializePage() |
242 { | 242 { |
243 Page::PageClients pageClients; | 243 Page::PageClients pageClients; |
244 fillWithEmptyClients(pageClients); | 244 fillWithEmptyClients(pageClients); |
245 m_chromeClient = PagePopupChromeClient::create(this); | 245 m_chromeClient = PagePopupChromeClient::create(this); |
246 pageClients.chromeClient = m_chromeClient.get(); | 246 pageClients.chromeClient = m_chromeClient.get(); |
247 | 247 |
248 m_page = adoptPtrWillBeNoop(new Page(pageClients)); | 248 m_page = Page::create(pageClients); |
249 m_page->settings().setScriptEnabled(true); | 249 m_page->settings().setScriptEnabled(true); |
250 m_page->settings().setAllowScriptsToCloseWindows(true); | 250 m_page->settings().setAllowScriptsToCloseWindows(true); |
251 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); | 251 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); |
252 // FIXME: Should we support enabling a11y while a popup is shown? | 252 // FIXME: Should we support enabling a11y while a popup is shown? |
253 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); | 253 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); |
254 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc
rollAnimatorEnabled()); | 254 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc
rollAnimatorEnabled()); |
255 | 255 |
256 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); | 256 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); |
257 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa
derClient, (EmptyFrameLoaderClient::create())); | 257 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa
derClient, (EmptyFrameLoaderClient::create())); |
258 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient.get(), &m_page->frameHost(), 0); | 258 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient.get(), &m_page->frameHost(), 0); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 // A WebPagePopupImpl instance usually has two references. | 540 // A WebPagePopupImpl instance usually has two references. |
541 // - One owned by the instance itself. It represents the visible widget. | 541 // - One owned by the instance itself. It represents the visible widget. |
542 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 542 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
543 // WebPagePopupImpl to close. | 543 // WebPagePopupImpl to close. |
544 // We need them because the closing operation is asynchronous and the widget | 544 // We need them because the closing operation is asynchronous and the widget |
545 // can be closed while the WebViewImpl is unaware of it. | 545 // can be closed while the WebViewImpl is unaware of it. |
546 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 546 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
547 } | 547 } |
548 | 548 |
549 } // namespace blink | 549 } // namespace blink |
OLD | NEW |