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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 bool WebPagePopupImpl::initPage() | 183 bool WebPagePopupImpl::initPage() |
184 { | 184 { |
185 Page::PageClients pageClients; | 185 Page::PageClients pageClients; |
186 fillWithEmptyClients(pageClients); | 186 fillWithEmptyClients(pageClients); |
187 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); | 187 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); |
188 pageClients.chromeClient = m_chromeClient.get(); | 188 pageClients.chromeClient = m_chromeClient.get(); |
189 | 189 |
190 m_page = adoptPtr(new Page(pageClients)); | 190 m_page = adoptPtr(new Page(pageClients)); |
191 m_page->settings()->setScriptEnabled(true); | 191 m_page->settings()->setScriptEnabled(true); |
192 m_page->settings()->setAllowScriptsToCloseWindows(true); | 192 m_page->settings()->setAllowScriptsToCloseWindows(true); |
| 193 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); |
193 | 194 |
194 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur
esClient(); | 195 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur
esClient(); |
195 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient); | 196 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient); |
196 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie
nt(); | 197 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie
nt(); |
197 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient)
; | 198 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient)
; |
198 frame->setView(FrameView::create(frame.get())); | 199 frame->setView(FrameView::create(frame.get())); |
199 frame->init(); | 200 frame->init(); |
200 frame->view()->resize(m_popupClient->contentSize()); | 201 frame->view()->resize(m_popupClient->contentSize()); |
201 frame->view()->setTransparent(false); | 202 frame->view()->setTransparent(false); |
202 | 203 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // We need them because the closing operation is asynchronous and the widget | 334 // We need them because the closing operation is asynchronous and the widget |
334 // can be closed while the WebViewImpl is unaware of it. | 335 // can be closed while the WebViewImpl is unaware of it. |
335 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 336 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
336 #else | 337 #else |
337 UNUSED_PARAM(client); | 338 UNUSED_PARAM(client); |
338 return 0; | 339 return 0; |
339 #endif | 340 #endif |
340 } | 341 } |
341 | 342 |
342 } // namespace WebKit | 343 } // namespace WebKit |
OLD | NEW |