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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1658923004: PurgeMemory. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 #include "core/testing/InternalRuntimeFlags.h" 121 #include "core/testing/InternalRuntimeFlags.h"
122 #include "core/testing/InternalSettings.h" 122 #include "core/testing/InternalSettings.h"
123 #include "core/testing/LayerRect.h" 123 #include "core/testing/LayerRect.h"
124 #include "core/testing/LayerRectList.h" 124 #include "core/testing/LayerRectList.h"
125 #include "core/testing/PrivateScriptTest.h" 125 #include "core/testing/PrivateScriptTest.h"
126 #include "core/testing/TypeConversions.h" 126 #include "core/testing/TypeConversions.h"
127 #include "core/testing/UnionTypesTest.h" 127 #include "core/testing/UnionTypesTest.h"
128 #include "core/workers/WorkerThread.h" 128 #include "core/workers/WorkerThread.h"
129 #include "platform/Cursor.h" 129 #include "platform/Cursor.h"
130 #include "platform/Language.h" 130 #include "platform/Language.h"
131 #include "platform/MemoryPurgeController.h"
131 #include "platform/PlatformKeyboardEvent.h" 132 #include "platform/PlatformKeyboardEvent.h"
132 #include "platform/RuntimeEnabledFeatures.h" 133 #include "platform/RuntimeEnabledFeatures.h"
133 #include "platform/TraceEvent.h" 134 #include "platform/TraceEvent.h"
134 #include "platform/geometry/IntRect.h" 135 #include "platform/geometry/IntRect.h"
135 #include "platform/geometry/LayoutRect.h" 136 #include "platform/geometry/LayoutRect.h"
136 #include "platform/graphics/GraphicsLayer.h" 137 #include "platform/graphics/GraphicsLayer.h"
137 #include "platform/heap/Handle.h" 138 #include "platform/heap/Handle.h"
138 #include "platform/weborigin/SchemeRegistry.h" 139 #include "platform/weborigin/SchemeRegistry.h"
139 #include "public/platform/Platform.h" 140 #include "public/platform/Platform.h"
140 #include "public/platform/WebConnectionType.h" 141 #include "public/platform/WebConnectionType.h"
141 #include "public/platform/WebGraphicsContext3D.h" 142 #include "public/platform/WebGraphicsContext3D.h"
142 #include "public/platform/WebGraphicsContext3DProvider.h" 143 #include "public/platform/WebGraphicsContext3DProvider.h"
143 #include "public/platform/WebLayer.h" 144 #include "public/platform/WebLayer.h"
145 #include "public/platform/WebMemoryPressureLevel.h"
144 #include "wtf/InstanceCounter.h" 146 #include "wtf/InstanceCounter.h"
145 #include "wtf/PassOwnPtr.h" 147 #include "wtf/PassOwnPtr.h"
146 #include "wtf/dtoa.h" 148 #include "wtf/dtoa.h"
147 #include "wtf/text/StringBuffer.h" 149 #include "wtf/text/StringBuffer.h"
148 #include <deque> 150 #include <deque>
149 #include <v8.h> 151 #include <v8.h>
150 152
151 namespace blink { 153 namespace blink {
152 154
153 namespace { 155 namespace {
(...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 element->triggerAutoplayViewportCheckForTesting(); 2561 element->triggerAutoplayViewportCheckForTesting();
2560 } 2562 }
2561 2563
2562 int Internals::getScrollAnimationState(Node* node) const 2564 int Internals::getScrollAnimationState(Node* node) const
2563 { 2565 {
2564 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2566 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2565 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); 2567 return static_cast<int>(scrollableArea->scrollAnimator().m_runState);
2566 return -1; 2568 return -1;
2567 } 2569 }
2568 2570
2571 void Internals::purgeMemory()
2572 {
2573 Page::onMemoryPressure();
2574 MemoryPurgeController::onMemoryPressure(WebMemoryPressureLevelCritical);
2575 }
2576
2569 } // namespace blink 2577 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698