Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1145)

Side by Side Diff: Source/web/WebHelperPluginImpl.cpp

Issue 146683003: Settings should not call into inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698