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

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

Issue 2529833002: Move suspend logic into OnMemoryStateChange() (Closed)
Patch Set: Created 4 years 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_RENDER_THREAD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 void OnProcessPurgeAndSuspend() override; 483 void OnProcessPurgeAndSuspend() override;
484 void RecordAction(const base::UserMetricsAction& action) override; 484 void RecordAction(const base::UserMetricsAction& action) override;
485 void RecordComputedAction(const std::string& action) override; 485 void RecordComputedAction(const std::string& action) override;
486 486
487 // GpuChannelHostFactory implementation: 487 // GpuChannelHostFactory implementation:
488 bool IsMainThread() override; 488 bool IsMainThread() override;
489 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 489 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
490 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 490 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
491 size_t size) override; 491 size_t size) override;
492 492
493 // Purges memory and suspends the renderer.
494 void SuspendRenderer();
495
493 // base::MemoryCoordinatorClient implementation: 496 // base::MemoryCoordinatorClient implementation:
494 void OnMemoryStateChange(base::MemoryState state) override; 497 void OnMemoryStateChange(base::MemoryState state) override;
495 498
496 void ClearMemory(); 499 void ClearMemory();
497 500
498 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); 501 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
499 502
500 void InitializeCompositorThread(); 503 void InitializeCompositorThread();
501 504
502 void InitializeWebKit( 505 void InitializeWebKit(
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 740 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
738 }; 741 };
739 742
740 #if defined(COMPILER_MSVC) 743 #if defined(COMPILER_MSVC)
741 #pragma warning(pop) 744 #pragma warning(pop)
742 #endif 745 #endif
743 746
744 } // namespace content 747 } // namespace content
745 748
746 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 749 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | content/renderer/render_thread_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698