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: Source/web/WebPagePopupImpl.cpp

Issue 224113006: Apply OwnPtr|PassOwnPtr to member variables and arguments in ContextFeatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/ContextFeaturesClientImpl.h ('k') | Source/web/WebViewImpl.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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 fillWithEmptyClients(pageClients); 203 fillWithEmptyClients(pageClients);
204 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); 204 m_chromeClient = adoptPtr(new PagePopupChromeClient(this));
205 pageClients.chromeClient = m_chromeClient.get(); 205 pageClients.chromeClient = m_chromeClient.get();
206 206
207 m_page = adoptPtr(new Page(pageClients)); 207 m_page = adoptPtr(new Page(pageClients));
208 m_page->settings().setScriptEnabled(true); 208 m_page->settings().setScriptEnabled(true);
209 m_page->settings().setAllowScriptsToCloseWindows(true); 209 m_page->settings().setAllowScriptsToCloseWindows(true);
210 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); 210 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor());
211 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch()); 211 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch());
212 212
213 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur esClient(); 213 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient()));
214 provideContextFeaturesTo(*m_page, pagePopupFeaturesClient);
215 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie nt(); 214 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie nt();
216 RefPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderClient, &m_pag e->frameHost(), 0); 215 RefPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderClient, &m_pag e->frameHost(), 0);
217 frame->setView(FrameView::create(frame.get())); 216 frame->setView(FrameView::create(frame.get()));
218 frame->init(); 217 frame->init();
219 frame->view()->resize(m_popupClient->contentSize()); 218 frame->view()->resize(m_popupClient->contentSize());
220 frame->view()->setTransparent(false); 219 frame->view()->setTransparent(false);
221 220
222 ASSERT(frame->domWindow()); 221 ASSERT(frame->domWindow());
223 DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient); 222 DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient);
224 223
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // A WebPagePopupImpl instance usually has two references. 425 // A WebPagePopupImpl instance usually has two references.
427 // - One owned by the instance itself. It represents the visible widget. 426 // - One owned by the instance itself. It represents the visible widget.
428 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 427 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
429 // WebPagePopupImpl to close. 428 // WebPagePopupImpl to close.
430 // We need them because the closing operation is asynchronous and the widget 429 // We need them because the closing operation is asynchronous and the widget
431 // can be closed while the WebViewImpl is unaware of it. 430 // can be closed while the WebViewImpl is unaware of it.
432 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 431 return adoptRef(new WebPagePopupImpl(client)).leakRef();
433 } 432 }
434 433
435 } // namespace blink 434 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ContextFeaturesClientImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698