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

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

Issue 2763513002: Change LocalFrame to take a Page instead of a FrameHost (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 mainSettings.getMinimumLogicalFontSize()); 300 mainSettings.getMinimumLogicalFontSize());
301 // FIXME: Should we support enabling a11y while a popup is shown? 301 // FIXME: Should we support enabling a11y while a popup is shown?
302 m_page->settings().setAccessibilityEnabled( 302 m_page->settings().setAccessibilityEnabled(
303 mainSettings.getAccessibilityEnabled()); 303 mainSettings.getAccessibilityEnabled());
304 m_page->settings().setScrollAnimatorEnabled( 304 m_page->settings().setScrollAnimatorEnabled(
305 mainSettings.getScrollAnimatorEnabled()); 305 mainSettings.getScrollAnimatorEnabled());
306 306
307 provideContextFeaturesTo(*m_page, WTF::makeUnique<PagePopupFeaturesClient>()); 307 provideContextFeaturesTo(*m_page, WTF::makeUnique<PagePopupFeaturesClient>());
308 DEFINE_STATIC_LOCAL(LocalFrameClient, emptyLocalFrameClient, 308 DEFINE_STATIC_LOCAL(LocalFrameClient, emptyLocalFrameClient,
309 (EmptyLocalFrameClient::create())); 309 (EmptyLocalFrameClient::create()));
310 LocalFrame* frame = 310 LocalFrame* frame = LocalFrame::create(&emptyLocalFrameClient, m_page, 0);
311 LocalFrame::create(&emptyLocalFrameClient, &m_page->frameHost(), 0);
312 frame->setPagePopupOwner(m_popupClient->ownerElement()); 311 frame->setPagePopupOwner(m_popupClient->ownerElement());
313 frame->setView(FrameView::create(*frame)); 312 frame->setView(FrameView::create(*frame));
314 frame->init(); 313 frame->init();
315 frame->view()->setParentVisible(true); 314 frame->view()->setParentVisible(true);
316 frame->view()->setSelfVisible(true); 315 frame->view()->setSelfVisible(true);
317 frame->view()->setTransparent(false); 316 frame->view()->setTransparent(false);
318 if (AXObjectCache* cache = 317 if (AXObjectCache* cache =
319 m_popupClient->ownerElement().document().existingAXObjectCache()) 318 m_popupClient->ownerElement().document().existingAXObjectCache())
320 cache->childrenChanged(&m_popupClient->ownerElement()); 319 cache->childrenChanged(&m_popupClient->ownerElement());
321 320
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // A WebPagePopupImpl instance usually has two references. 588 // A WebPagePopupImpl instance usually has two references.
590 // - One owned by the instance itself. It represents the visible widget. 589 // - One owned by the instance itself. It represents the visible widget.
591 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 590 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
592 // WebPagePopupImpl to close. 591 // WebPagePopupImpl to close.
593 // We need them because the closing operation is asynchronous and the widget 592 // We need them because the closing operation is asynchronous and the widget
594 // can be closed while the WebViewImpl is unaware of it. 593 // can be closed while the WebViewImpl is unaware of it.
595 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 594 return adoptRef(new WebPagePopupImpl(client)).leakRef();
596 } 595 }
597 596
598 } // namespace blink 597 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698