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

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

Issue 2762423003: Made Frame constructors (and subclasses) take Page& instead of Page* (Closed)
Patch Set: Rebase 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
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 = LocalFrame::create(&emptyLocalFrameClient, m_page, 0); 310 LocalFrame* frame = LocalFrame::create(&emptyLocalFrameClient, *m_page, 0);
311 frame->setPagePopupOwner(m_popupClient->ownerElement()); 311 frame->setPagePopupOwner(m_popupClient->ownerElement());
312 frame->setView(FrameView::create(*frame)); 312 frame->setView(FrameView::create(*frame));
313 frame->init(); 313 frame->init();
314 frame->view()->setParentVisible(true); 314 frame->view()->setParentVisible(true);
315 frame->view()->setSelfVisible(true); 315 frame->view()->setSelfVisible(true);
316 frame->view()->setTransparent(false); 316 frame->view()->setTransparent(false);
317 if (AXObjectCache* cache = 317 if (AXObjectCache* cache =
318 m_popupClient->ownerElement().document().existingAXObjectCache()) 318 m_popupClient->ownerElement().document().existingAXObjectCache())
319 cache->childrenChanged(&m_popupClient->ownerElement()); 319 cache->childrenChanged(&m_popupClient->ownerElement());
320 320
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 // A WebPagePopupImpl instance usually has two references. 588 // A WebPagePopupImpl instance usually has two references.
589 // - One owned by the instance itself. It represents the visible widget. 589 // - One owned by the instance itself. It represents the visible widget.
590 // - 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
591 // WebPagePopupImpl to close. 591 // WebPagePopupImpl to close.
592 // 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
593 // can be closed while the WebViewImpl is unaware of it. 593 // can be closed while the WebViewImpl is unaware of it.
594 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 594 return adoptRef(new WebPagePopupImpl(client)).leakRef();
595 } 595 }
596 596
597 } // namespace blink 597 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698