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 } | 201 } |
202 | 202 |
203 bool WebHelperPluginImpl::initializePage(const String& pluginType, const WebDocu
ment& hostDocument) | 203 bool WebHelperPluginImpl::initializePage(const String& pluginType, const WebDocu
ment& hostDocument) |
204 { | 204 { |
205 Page::PageClients pageClients; | 205 Page::PageClients pageClients; |
206 fillWithEmptyClients(pageClients); | 206 fillWithEmptyClients(pageClients); |
207 m_chromeClient = adoptPtr(new HelperPluginChromeClient(this)); | 207 m_chromeClient = adoptPtr(new HelperPluginChromeClient(this)); |
208 pageClients.chromeClient = m_chromeClient.get(); | 208 pageClients.chromeClient = m_chromeClient.get(); |
209 | 209 |
210 m_page = adoptPtr(new Page(pageClients)); | 210 m_page = adoptPtr(new Page(pageClients)); |
211 ASSERT(!m_page->settings().isScriptEnabled()); | 211 ASSERT(!m_page->settings().scriptEnabled()); |
212 m_page->settings().setPluginsEnabled(true); | 212 m_page->settings().setPluginsEnabled(true); |
213 | 213 |
214 m_webView->client()->initializeHelperPluginWebFrame(this); | 214 m_webView->client()->initializeHelperPluginWebFrame(this); |
215 | 215 |
216 // The page's main frame was set in initializeFrame() as a result of the abo
ve call. | 216 // The page's main frame was set in initializeFrame() as a result of the abo
ve call. |
217 Frame* frame = m_page->mainFrame(); | 217 Frame* frame = m_page->mainFrame(); |
218 ASSERT(frame); | 218 ASSERT(frame); |
219 frame->loader().forceSandboxFlags(SandboxAll & ~SandboxPlugins); | 219 frame->loader().forceSandboxFlags(SandboxAll & ~SandboxPlugins); |
220 frame->setView(FrameView::create(frame)); | 220 frame->setView(FrameView::create(frame)); |
221 // No need to set a size or make it not transparent. | 221 // No need to set a size or make it not transparent. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 { | 260 { |
261 RELEASE_ASSERT(client); | 261 RELEASE_ASSERT(client); |
262 | 262 |
263 // The returned object is owned by the caller, which must destroy it by | 263 // The returned object is owned by the caller, which must destroy it by |
264 // calling closeAndDelete(). The WebWidgetClient must not call close() | 264 // calling closeAndDelete(). The WebWidgetClient must not call close() |
265 // other than as a result of closeAndDelete(). | 265 // other than as a result of closeAndDelete(). |
266 return new WebHelperPluginImpl(client); | 266 return new WebHelperPluginImpl(client); |
267 } | 267 } |
268 | 268 |
269 } // namespace blink | 269 } // namespace blink |
OLD | NEW |