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

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

Issue 46783003: Add a unique frame id and save it on HistoryItem. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/WebHistoryItem.cpp ('k') | public/web/WebHistoryItem.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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 m_page = adoptPtr(new Page(pageClients)); 198 m_page = adoptPtr(new Page(pageClients));
199 m_page->settings().setScriptEnabled(true); 199 m_page->settings().setScriptEnabled(true);
200 m_page->settings().setAllowScriptsToCloseWindows(true); 200 m_page->settings().setAllowScriptsToCloseWindows(true);
201 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); 201 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor());
202 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch()); 202 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch());
203 203
204 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur esClient(); 204 static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeatur esClient();
205 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient); 205 provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient);
206 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie nt(); 206 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie nt();
207 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient) ; 207 RefPtr<Frame> frame = Frame::create(FrameInit::create(0, m_page.get(), empty FrameLoaderClient));
208 frame->setView(FrameView::create(frame.get())); 208 frame->setView(FrameView::create(frame.get()));
209 frame->init(); 209 frame->init();
210 frame->view()->resize(m_popupClient->contentSize()); 210 frame->view()->resize(m_popupClient->contentSize());
211 frame->view()->setTransparent(false); 211 frame->view()->setTransparent(false);
212 212
213 DOMWindowPagePopup::install(frame->domWindow(), m_popupClient); 213 DOMWindowPagePopup::install(frame->domWindow(), m_popupClient);
214 214
215 DocumentWriter* writer = frame->loader().activeDocumentLoader()->beginWritin g("text/html", "UTF-8"); 215 DocumentWriter* writer = frame->loader().activeDocumentLoader()->beginWritin g("text/html", "UTF-8");
216 m_popupClient->writeDocument(*writer); 216 m_popupClient->writeDocument(*writer);
217 frame->loader().activeDocumentLoader()->endWriting(writer); 217 frame->loader().activeDocumentLoader()->endWriting(writer);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // A WebPagePopupImpl instance usually has two references. 342 // A WebPagePopupImpl instance usually has two references.
343 // - One owned by the instance itself. It represents the visible widget. 343 // - One owned by the instance itself. It represents the visible widget.
344 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 344 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
345 // WebPagePopupImpl to close. 345 // WebPagePopupImpl to close.
346 // We need them because the closing operation is asynchronous and the widget 346 // We need them because the closing operation is asynchronous and the widget
347 // can be closed while the WebViewImpl is unaware of it. 347 // can be closed while the WebViewImpl is unaware of it.
348 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 348 return adoptRef(new WebPagePopupImpl(client)).leakRef();
349 } 349 }
350 350
351 } // namespace WebKit 351 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebHistoryItem.cpp ('k') | public/web/WebHistoryItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698