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

Side by Side Diff: Source/core/page/DOMWindow.cpp

Issue 25767002: Inline SuddenTermination.h into the one file that uses it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/platform/SuddenTermination.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, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 #include "core/page/Page.h" 81 #include "core/page/Page.h"
82 #include "core/page/PageConsole.h" 82 #include "core/page/PageConsole.h"
83 #include "core/page/PageGroup.h" 83 #include "core/page/PageGroup.h"
84 #include "core/page/Performance.h" 84 #include "core/page/Performance.h"
85 #include "core/page/Screen.h" 85 #include "core/page/Screen.h"
86 #include "core/page/Settings.h" 86 #include "core/page/Settings.h"
87 #include "core/page/WindowFeatures.h" 87 #include "core/page/WindowFeatures.h"
88 #include "core/page/WindowFocusAllowedIndicator.h" 88 #include "core/page/WindowFocusAllowedIndicator.h"
89 #include "core/page/scrolling/ScrollingCoordinator.h" 89 #include "core/page/scrolling/ScrollingCoordinator.h"
90 #include "core/platform/PlatformScreen.h" 90 #include "core/platform/PlatformScreen.h"
91 #include "core/platform/SuddenTermination.h"
92 #include "core/platform/graphics/MediaPlayer.h" 91 #include "core/platform/graphics/MediaPlayer.h"
93 #include "core/storage/Storage.h" 92 #include "core/storage/Storage.h"
94 #include "core/storage/StorageArea.h" 93 #include "core/storage/StorageArea.h"
95 #include "core/storage/StorageNamespace.h" 94 #include "core/storage/StorageNamespace.h"
96 #include "modules/device_orientation/NewDeviceOrientationController.h" 95 #include "modules/device_orientation/NewDeviceOrientationController.h"
97 #include "platform/geometry/FloatRect.h" 96 #include "platform/geometry/FloatRect.h"
97 #include "public/platform/Platform.h"
98 #include "weborigin/KURL.h" 98 #include "weborigin/KURL.h"
99 #include "weborigin/SecurityOrigin.h" 99 #include "weborigin/SecurityOrigin.h"
100 #include "weborigin/SecurityPolicy.h" 100 #include "weborigin/SecurityPolicy.h"
101 101
102 using std::min; 102 using std::min;
103 using std::max; 103 using std::max;
104 104
105 namespace WebCore { 105 namespace WebCore {
106 106
107 class PostMessageTimer : public TimerBase { 107 class PostMessageTimer : public TimerBase {
(...skipping 26 matching lines...) Expand all
134 134
135 RefPtr<DOMWindow> m_window; 135 RefPtr<DOMWindow> m_window;
136 RefPtr<SerializedScriptValue> m_message; 136 RefPtr<SerializedScriptValue> m_message;
137 String m_origin; 137 String m_origin;
138 RefPtr<DOMWindow> m_source; 138 RefPtr<DOMWindow> m_source;
139 OwnPtr<MessagePortChannelArray> m_channels; 139 OwnPtr<MessagePortChannelArray> m_channels;
140 RefPtr<SecurityOrigin> m_targetOrigin; 140 RefPtr<SecurityOrigin> m_targetOrigin;
141 RefPtr<ScriptCallStack> m_stackTrace; 141 RefPtr<ScriptCallStack> m_stackTrace;
142 }; 142 };
143 143
144 static void disableSuddenTermination()
145 {
146 WebKit::Platform::current()->suddenTerminationChanged(false);
147 }
148
149 static void enableSuddenTermination()
150 {
151 WebKit::Platform::current()->suddenTerminationChanged(true);
152 }
153
144 typedef HashCountedSet<DOMWindow*> DOMWindowSet; 154 typedef HashCountedSet<DOMWindow*> DOMWindowSet;
145 155
146 static DOMWindowSet& windowsWithUnloadEventListeners() 156 static DOMWindowSet& windowsWithUnloadEventListeners()
147 { 157 {
148 DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithUnloadEventListeners, ()); 158 DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithUnloadEventListeners, ());
149 return windowsWithUnloadEventListeners; 159 return windowsWithUnloadEventListeners;
150 } 160 }
151 161
152 static DOMWindowSet& windowsWithBeforeUnloadEventListeners() 162 static DOMWindowSet& windowsWithBeforeUnloadEventListeners()
153 { 163 {
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN otifier()); 1771 return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN otifier());
1762 } 1772 }
1763 1773
1764 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier() 1774 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier()
1765 { 1775 {
1766 return DOMWindowLifecycleNotifier::create(this); 1776 return DOMWindowLifecycleNotifier::create(this);
1767 } 1777 }
1768 1778
1769 1779
1770 } // namespace WebCore 1780 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/platform/SuddenTermination.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698