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

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

Issue 1914143002: Experimental 'purging and suspending' backgrounded tabs behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address on haraken's review Created 4 years, 7 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
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop, 459 RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop,
460 std::unique_ptr<scheduler::RendererScheduler> scheduler); 460 std::unique_ptr<scheduler::RendererScheduler> scheduler);
461 461
462 private: 462 private:
463 // IPC::Listener 463 // IPC::Listener
464 void OnChannelError() override; 464 void OnChannelError() override;
465 465
466 // ChildThread 466 // ChildThread
467 bool OnControlMessageReceived(const IPC::Message& msg) override; 467 bool OnControlMessageReceived(const IPC::Message& msg) override;
468 void OnProcessBackgrounded(bool backgrounded) override; 468 void OnProcessBackgrounded(bool backgrounded) override;
469 void OnProcessPurgeAndSuspend() override;
469 void RecordAction(const base::UserMetricsAction& action) override; 470 void RecordAction(const base::UserMetricsAction& action) override;
470 void RecordComputedAction(const std::string& action) override; 471 void RecordComputedAction(const std::string& action) override;
471 472
472 // GpuChannelHostFactory implementation: 473 // GpuChannelHostFactory implementation:
473 bool IsMainThread() override; 474 bool IsMainThread() override;
474 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 475 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
475 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 476 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
476 size_t size) override; 477 size_t size) override;
477 478
478 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); 479 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 shell::mojom::InterfaceProviderRequest services_; 700 shell::mojom::InterfaceProviderRequest services_;
700 shell::mojom::InterfaceProviderPtr exposed_services_; 701 shell::mojom::InterfaceProviderPtr exposed_services_;
701 }; 702 };
702 703
703 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> 704 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>>
704 PendingRenderFrameConnectMap; 705 PendingRenderFrameConnectMap;
705 PendingRenderFrameConnectMap pending_render_frame_connects_; 706 PendingRenderFrameConnectMap pending_render_frame_connects_;
706 707
707 mojom::StoragePartitionServicePtr storage_partition_service_; 708 mojom::StoragePartitionServicePtr storage_partition_service_;
708 709
710 bool is_renderer_suspended_;
711
709 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 712 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
710 }; 713 };
711 714
712 #if defined(COMPILER_MSVC) 715 #if defined(COMPILER_MSVC)
713 #pragma warning(pop) 716 #pragma warning(pop)
714 #endif 717 #endif
715 718
716 } // namespace content 719 } // namespace content
717 720
718 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 721 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698