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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 Page::PageClients pageClients; | 201 Page::PageClients pageClients; |
202 fillWithEmptyClients(pageClients); | 202 fillWithEmptyClients(pageClients); |
203 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); | 203 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); |
204 pageClients.chromeClient = m_chromeClient.get(); | 204 pageClients.chromeClient = m_chromeClient.get(); |
205 | 205 |
206 m_page = adoptPtr(new Page(pageClients)); | 206 m_page = adoptPtr(new Page(pageClients)); |
207 m_page->settings()->setScriptEnabled(true); | 207 m_page->settings()->setScriptEnabled(true); |
208 m_page->settings()->setAllowScriptsToCloseWindows(true); | 208 m_page->settings()->setAllowScriptsToCloseWindows(true); |
209 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); | 209 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); |
210 m_page->settings()->setDeviceSupportsTouch(m_webView->page()->settings()->de
viceSupportsTouch()); | 210 m_page->settings()->setDeviceSupportsTouch(m_webView->page()->settings()->de
viceSupportsTouch()); |
| 211 m_page->settings()->setPrimaryPointerDevices(m_webView->page()->settings()->
primaryPointerDevices()); |
211 | 212 |
212 unsigned layoutMilestones = DidFirstLayout | DidFirstVisuallyNonEmptyLayout; | 213 unsigned layoutMilestones = DidFirstLayout | DidFirstVisuallyNonEmptyLayout; |
213 m_page->addLayoutMilestones(static_cast<LayoutMilestones>(layoutMilestones))
; | 214 m_page->addLayoutMilestones(static_cast<LayoutMilestones>(layoutMilestones))
; |
214 | 215 |
215 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur
esClient(); | 216 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur
esClient(); |
216 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient); | 217 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient); |
217 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie
nt(); | 218 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie
nt(); |
218 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient)
; | 219 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient)
; |
219 frame->setView(FrameView::create(frame.get())); | 220 frame->setView(FrameView::create(frame.get())); |
220 frame->init(); | 221 frame->init(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 // We need them because the closing operation is asynchronous and the widget | 367 // We need them because the closing operation is asynchronous and the widget |
367 // can be closed while the WebViewImpl is unaware of it. | 368 // can be closed while the WebViewImpl is unaware of it. |
368 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 369 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
369 #else | 370 #else |
370 UNUSED_PARAM(client); | 371 UNUSED_PARAM(client); |
371 return 0; | 372 return 0; |
372 #endif | 373 #endif |
373 } | 374 } |
374 | 375 |
375 } // namespace WebKit | 376 } // namespace WebKit |
OLD | NEW |