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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.h

Issue 2668663002: Purge memory before suspending timer queues when backgrounded. (Closed)
Patch Set: Patch for landing Created 3 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class WebSecurityOrigin; 43 class WebSecurityOrigin;
44 class WebServiceWorkerCacheStorage; 44 class WebServiceWorkerCacheStorage;
45 } 45 }
46 46
47 namespace service_manager { 47 namespace service_manager {
48 class InterfaceProvider; 48 class InterfaceProvider;
49 } 49 }
50 50
51 namespace content { 51 namespace content {
52 class BlinkInterfaceProviderImpl; 52 class BlinkInterfaceProviderImpl;
53 class ChildMemoryCoordinatorImpl;
53 class LocalStorageCachedAreas; 54 class LocalStorageCachedAreas;
54 class PlatformEventObserverBase; 55 class PlatformEventObserverBase;
55 class QuotaMessageFilter; 56 class QuotaMessageFilter;
56 class RendererClipboardDelegate; 57 class RendererClipboardDelegate;
57 class ThreadSafeSender; 58 class ThreadSafeSender;
58 class WebClipboardImpl; 59 class WebClipboardImpl;
59 class WebDatabaseObserverImpl; 60 class WebDatabaseObserverImpl;
60 61
61 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { 62 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
62 public: 63 public:
63 RendererBlinkPlatformImpl( 64 RendererBlinkPlatformImpl(
64 blink::scheduler::RendererScheduler* renderer_scheduler, 65 blink::scheduler::RendererScheduler* renderer_scheduler,
65 base::WeakPtr<service_manager::InterfaceProvider> remote_interfaces); 66 base::WeakPtr<service_manager::InterfaceProvider> remote_interfaces,
67 ChildMemoryCoordinatorImpl* memory_coordinator);
66 ~RendererBlinkPlatformImpl() override; 68 ~RendererBlinkPlatformImpl() override;
67 69
68 // Shutdown must be called just prior to shutting down blink. 70 // Shutdown must be called just prior to shutting down blink.
69 void Shutdown(); 71 void Shutdown();
70 72
71 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) { 73 void set_plugin_refresh_allowed(bool plugin_refresh_allowed) {
72 plugin_refresh_allowed_ = plugin_refresh_allowed; 74 plugin_refresh_allowed_ = plugin_refresh_allowed;
73 } 75 }
74 // Platform methods: 76 // Platform methods:
75 blink::WebClipboard* clipboard() override; 77 blink::WebClipboard* clipboard() override;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // is invoked. 226 // is invoked.
225 static void SetMockDeviceOrientationDataForTesting( 227 static void SetMockDeviceOrientationDataForTesting(
226 const blink::WebDeviceOrientationData& data); 228 const blink::WebDeviceOrientationData& data);
227 229
228 WebDatabaseObserverImpl* web_database_observer_impl() { 230 WebDatabaseObserverImpl* web_database_observer_impl() {
229 return web_database_observer_impl_.get(); 231 return web_database_observer_impl_.get();
230 } 232 }
231 233
232 blink::WebURLLoader* createURLLoader() override; 234 blink::WebURLLoader* createURLLoader() override;
233 235
236 void requestPurgeMemory() override;
237
234 private: 238 private:
235 bool CheckPreparsedJsCachingEnabled() const; 239 bool CheckPreparsedJsCachingEnabled() const;
236 240
237 // Factory that takes a type and return PlatformEventObserverBase that matches 241 // Factory that takes a type and return PlatformEventObserverBase that matches
238 // it. 242 // it.
239 static std::unique_ptr<PlatformEventObserverBase> 243 static std::unique_ptr<PlatformEventObserverBase>
240 CreatePlatformEventObserverFromType(blink::WebPlatformEventType type); 244 CreatePlatformEventObserverFromType(blink::WebPlatformEventType type);
241 245
242 // Use the data previously set via SetMockDevice...DataForTesting() and send 246 // Use the data previously set via SetMockDevice...DataForTesting() and send
243 // them to the registered listener. 247 // them to the registered listener.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 TopLevelBlameContext top_level_blame_context_; 294 TopLevelBlameContext top_level_blame_context_;
291 295
292 WebTrialTokenValidatorImpl trial_token_validator_; 296 WebTrialTokenValidatorImpl trial_token_validator_;
293 297
294 std::unique_ptr<LocalStorageCachedAreas> local_storage_cached_areas_; 298 std::unique_ptr<LocalStorageCachedAreas> local_storage_cached_areas_;
295 299
296 std::unique_ptr<BlinkInterfaceProviderImpl> blink_interface_provider_; 300 std::unique_ptr<BlinkInterfaceProviderImpl> blink_interface_provider_;
297 301
298 mojom::URLLoaderFactoryAssociatedPtr url_loader_factory_; 302 mojom::URLLoaderFactoryAssociatedPtr url_loader_factory_;
299 303
304 ChildMemoryCoordinatorImpl* memory_coordinator_; // NOT OWNED
305
300 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); 306 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl);
301 }; 307 };
302 308
303 } // namespace content 309 } // namespace content
304 310
305 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 311 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698