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

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 reviews 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
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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop, 456 RenderThreadImpl(std::unique_ptr<base::MessageLoop> main_message_loop,
457 std::unique_ptr<scheduler::RendererScheduler> scheduler); 457 std::unique_ptr<scheduler::RendererScheduler> scheduler);
458 458
459 private: 459 private:
460 // IPC::Listener 460 // IPC::Listener
461 void OnChannelError() override; 461 void OnChannelError() override;
462 462
463 // ChildThread 463 // ChildThread
464 bool OnControlMessageReceived(const IPC::Message& msg) override; 464 bool OnControlMessageReceived(const IPC::Message& msg) override;
465 void OnProcessBackgrounded(bool backgrounded) override; 465 void OnProcessBackgrounded(bool backgrounded) override;
466 void OnProcessPurgeAndSuspend() override;
466 void RecordAction(const base::UserMetricsAction& action) override; 467 void RecordAction(const base::UserMetricsAction& action) override;
467 void RecordComputedAction(const std::string& action) override; 468 void RecordComputedAction(const std::string& action) override;
468 469
469 // GpuChannelHostFactory implementation: 470 // GpuChannelHostFactory implementation:
470 bool IsMainThread() override; 471 bool IsMainThread() override;
471 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 472 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
472 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 473 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
473 size_t size) override; 474 size_t size) override;
474 475
475 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); 476 void Init(scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 shell::mojom::InterfaceProviderRequest services_; 693 shell::mojom::InterfaceProviderRequest services_;
693 shell::mojom::InterfaceProviderPtr exposed_services_; 694 shell::mojom::InterfaceProviderPtr exposed_services_;
694 }; 695 };
695 696
696 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>> 697 typedef std::map<int, scoped_refptr<PendingRenderFrameConnect>>
697 PendingRenderFrameConnectMap; 698 PendingRenderFrameConnectMap;
698 PendingRenderFrameConnectMap pending_render_frame_connects_; 699 PendingRenderFrameConnectMap pending_render_frame_connects_;
699 700
700 mojom::StoragePartitionServicePtr storage_partition_service_; 701 mojom::StoragePartitionServicePtr storage_partition_service_;
701 702
703 bool is_backgrounded_;
704 bool is_cache_purged_;
705
702 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 706 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
703 }; 707 };
704 708
705 #if defined(COMPILER_MSVC) 709 #if defined(COMPILER_MSVC)
706 #pragma warning(pop) 710 #pragma warning(pop)
707 #endif 711 #endif
708 712
709 } // namespace content 713 } // namespace content
710 714
711 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 715 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698