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

Side by Side Diff: webkit/glue/webframe_impl.cc

Issue 9746: Change old code from "unloadListnerChanged" model to new WebKit EnableSuddenT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.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) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 GraphicsContext spool(context); 1838 GraphicsContext spool(context);
1839 #endif 1839 #endif
1840 1840
1841 DCHECK(pages_[page].x() == 0); 1841 DCHECK(pages_[page].x() == 0);
1842 // Offset to get the right square. 1842 // Offset to get the right square.
1843 spool.translate(0, -static_cast<float>(pages_[page].y())); 1843 spool.translate(0, -static_cast<float>(pages_[page].y()));
1844 frame()->view()->paint(&spool, pages_[page]); 1844 frame()->view()->paint(&spool, pages_[page]);
1845 return true; 1845 return true;
1846 } 1846 }
1847 1847
1848 bool WebFrameImpl::HasUnloadListener() {
1849 if (frame() && frame()->document()) {
1850 Document* doc = frame()->document();
1851 return doc->hasUnloadEventListener();
1852 }
1853 return false;
1854 }
1855
1856 bool WebFrameImpl::IsReloadAllowingStaleData() const { 1848 bool WebFrameImpl::IsReloadAllowingStaleData() const {
1857 FrameLoader* loader = frame() ? frame()->loader() : NULL; 1849 FrameLoader* loader = frame() ? frame()->loader() : NULL;
1858 if (loader) { 1850 if (loader) {
1859 return WebCore::FrameLoadTypeReloadAllowingStaleData == 1851 return WebCore::FrameLoadTypeReloadAllowingStaleData ==
1860 loader->policyLoadType(); 1852 loader->policyLoadType();
1861 } 1853 }
1862 return false; 1854 return false;
1863 } 1855 }
1864 1856
1865 int WebFrameImpl::PendingFrameUnloadEventCount() const { 1857 int WebFrameImpl::PendingFrameUnloadEventCount() const {
1866 return frame()->eventHandler()->pendingFrameUnloadEventCount(); 1858 return frame()->eventHandler()->pendingFrameUnloadEventCount();
1867 } 1859 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698