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/WebFrameImpl.cpp

Issue 219163005: Move dispatchUnloadEvent to WebFrame, part 1/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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/WebFrameImpl.h ('k') | Source/web/WebViewImpl.cpp » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 return WebPerformance(&frame()->domWindow()->performance()); 745 return WebPerformance(&frame()->domWindow()->performance());
746 } 746 }
747 747
748 bool WebFrameImpl::dispatchBeforeUnloadEvent() 748 bool WebFrameImpl::dispatchBeforeUnloadEvent()
749 { 749 {
750 if (!frame()) 750 if (!frame())
751 return true; 751 return true;
752 return frame()->loader().shouldClose(); 752 return frame()->loader().shouldClose();
753 } 753 }
754 754
755 void WebFrameImpl::dispatchUnloadEvent()
756 {
757 if (!frame())
758 return;
759 frame()->loader().closeURL();
760 }
761
755 NPObject* WebFrameImpl::windowObject() const 762 NPObject* WebFrameImpl::windowObject() const
756 { 763 {
757 if (!frame()) 764 if (!frame())
758 return 0; 765 return 0;
759 return frame()->script().windowScriptNPObject(); 766 return frame()->script().windowScriptNPObject();
760 } 767 }
761 768
762 void WebFrameImpl::bindToWindowObject(const WebString& name, NPObject* object) 769 void WebFrameImpl::bindToWindowObject(const WebString& name, NPObject* object)
763 { 770 {
764 bindToWindowObject(name, object, 0); 771 bindToWindowObject(name, object, 0);
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 1984
1978 void WebFrameImpl::invalidateAll() const 1985 void WebFrameImpl::invalidateAll() const
1979 { 1986 {
1980 ASSERT(frame() && frame()->view()); 1987 ASSERT(frame() && frame()->view());
1981 FrameView* view = frame()->view(); 1988 FrameView* view = frame()->view();
1982 view->invalidateRect(view->frameRect()); 1989 view->invalidateRect(view->frameRect());
1983 invalidateScrollbar(); 1990 invalidateScrollbar();
1984 } 1991 }
1985 1992
1986 } // namespace blink 1993 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698