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

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

Issue 1306793003: Oilpan: Move FrameLoaderClient class hierarchy into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/WebRemoteFrameImpl.h » ('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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 m_page = adoptPtrWillBeNoop(new Page(pageClients)); 237 m_page = adoptPtrWillBeNoop(new Page(pageClients));
238 m_page->settings().setScriptEnabled(true); 238 m_page->settings().setScriptEnabled(true);
239 m_page->settings().setAllowScriptsToCloseWindows(true); 239 m_page->settings().setAllowScriptsToCloseWindows(true);
240 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); 240 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor());
241 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch()); 241 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch());
242 // FIXME: Should we support enabling a11y while a popup is shown? 242 // FIXME: Should we support enabling a11y while a popup is shown?
243 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc essibilityEnabled()); 243 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc essibilityEnabled());
244 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc rollAnimatorEnabled()); 244 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc rollAnimatorEnabled());
245 245
246 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); 246 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient()));
247 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClien t(); 247 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa derClient, (EmptyFrameLoaderClient::create()));
248 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl ient, &m_page->frameHost(), 0); 248 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl ient.get(), &m_page->frameHost(), 0);
249 frame->setPagePopupOwner(m_popupClient->ownerElement()); 249 frame->setPagePopupOwner(m_popupClient->ownerElement());
250 frame->setView(FrameView::create(frame.get())); 250 frame->setView(FrameView::create(frame.get()));
251 frame->init(); 251 frame->init();
252 frame->view()->resize(m_popupClient->contentSize()); 252 frame->view()->resize(m_popupClient->contentSize());
253 frame->view()->setTransparent(false); 253 frame->view()->setTransparent(false);
254 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing AXObjectCache()) 254 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing AXObjectCache())
255 cache->childrenChanged(&m_popupClient->ownerElement()); 255 cache->childrenChanged(&m_popupClient->ownerElement());
256 256
257 ASSERT(frame->localDOMWindow()); 257 ASSERT(frame->localDOMWindow());
258 DOMWindowPagePopup::install(*frame->localDOMWindow(), *this, m_popupClient); 258 DOMWindowPagePopup::install(*frame->localDOMWindow(), *this, m_popupClient);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // A WebPagePopupImpl instance usually has two references. 517 // A WebPagePopupImpl instance usually has two references.
518 // - One owned by the instance itself. It represents the visible widget. 518 // - One owned by the instance itself. It represents the visible widget.
519 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 519 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
520 // WebPagePopupImpl to close. 520 // WebPagePopupImpl to close.
521 // We need them because the closing operation is asynchronous and the widget 521 // We need them because the closing operation is asynchronous and the widget
522 // can be closed while the WebViewImpl is unaware of it. 522 // can be closed while the WebViewImpl is unaware of it.
523 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 523 return adoptRef(new WebPagePopupImpl(client)).leakRef();
524 } 524 }
525 525
526 } // namespace blink 526 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698