OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |