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

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

Issue 2391423004: Add UMA for PurgeAndSuspend. (Closed)
Patch Set: Fixed histograms.xml. Created 4 years, 2 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
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/cancelable_callback.h" 15 #include "base/cancelable_callback.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/memory_coordinator_client.h" 17 #include "base/memory/memory_coordinator_client.h"
18 #include "base/memory/memory_pressure_listener.h" 18 #include "base/memory/memory_pressure_listener.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/metrics/user_metrics_action.h" 20 #include "base/metrics/user_metrics_action.h"
21 #include "base/observer_list.h" 21 #include "base/observer_list.h"
22 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
23 #include "base/threading/thread_checker.h" 23 #include "base/threading/thread_checker.h"
24 #include "base/timer/timer.h" 24 #include "base/timer/timer.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "content/child/child_discardable_shared_memory_manager.h"
26 #include "content/child/child_thread_impl.h" 27 #include "content/child/child_thread_impl.h"
27 #include "content/child/memory/child_memory_coordinator_impl.h" 28 #include "content/child/memory/child_memory_coordinator_impl.h"
28 #include "content/common/associated_interface_registry_impl.h" 29 #include "content/common/associated_interface_registry_impl.h"
29 #include "content/common/content_export.h" 30 #include "content/common/content_export.h"
30 #include "content/common/frame.mojom.h" 31 #include "content/common/frame.mojom.h"
31 #include "content/common/frame_replication_state.h" 32 #include "content/common/frame_replication_state.h"
32 #include "content/common/render_frame_message_filter.mojom.h" 33 #include "content/common/render_frame_message_filter.mojom.h"
33 #include "content/common/render_message_filter.mojom.h" 34 #include "content/common/render_message_filter.mojom.h"
34 #include "content/common/renderer.mojom.h" 35 #include "content/common/renderer.mojom.h"
35 #include "content/common/storage_partition_service.mojom.h" 36 #include "content/common/storage_partition_service.mojom.h"
36 #include "content/public/renderer/render_thread.h" 37 #include "content/public/renderer/render_thread.h"
37 #include "content/renderer/gpu/compositor_dependencies.h" 38 #include "content/renderer/gpu/compositor_dependencies.h"
38 #include "content/renderer/layout_test_dependencies.h" 39 #include "content/renderer/layout_test_dependencies.h"
39 #include "device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom.h" 40 #include "device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom.h"
40 #include "gpu/ipc/client/gpu_channel_host.h" 41 #include "gpu/ipc/client/gpu_channel_host.h"
41 #include "mojo/public/cpp/bindings/associated_binding.h" 42 #include "mojo/public/cpp/bindings/associated_binding.h"
42 #include "mojo/public/cpp/bindings/binding.h" 43 #include "mojo/public/cpp/bindings/binding.h"
43 #include "net/base/network_change_notifier.h" 44 #include "net/base/network_change_notifier.h"
44 #include "third_party/WebKit/public/platform/WebConnectionType.h" 45 #include "third_party/WebKit/public/platform/WebConnectionType.h"
45 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h" 46 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h"
47 #include "third_party/WebKit/public/web/WebMemoryStatistics.h"
46 #include "ui/gfx/native_widget_types.h" 48 #include "ui/gfx/native_widget_types.h"
47 49
48 #if defined(OS_MACOSX) 50 #if defined(OS_MACOSX)
49 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h" 51 #include "third_party/WebKit/public/web/mac/WebScrollbarTheme.h"
50 #endif 52 #endif
51 53
52 class GrContext; 54 class GrContext;
53 class SkBitmap; 55 class SkBitmap;
54 struct ViewMsg_UpdateScrollbarTheme_Params; 56 struct ViewMsg_UpdateScrollbarTheme_Params;
55 struct WorkerProcessMsg_CreateWorker_Params; 57 struct WorkerProcessMsg_CreateWorker_Params;
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 void OnSystemColorsChanged(int aqua_color_variant, 540 void OnSystemColorsChanged(int aqua_color_variant,
539 const std::string& highlight_text_color, 541 const std::string& highlight_text_color,
540 const std::string& highlight_color); 542 const std::string& highlight_color);
541 #endif 543 #endif
542 void OnCreateNewSharedWorker( 544 void OnCreateNewSharedWorker(
543 const WorkerProcessMsg_CreateWorker_Params& params); 545 const WorkerProcessMsg_CreateWorker_Params& params);
544 bool RendererIsHidden() const; 546 bool RendererIsHidden() const;
545 void OnRendererHidden(); 547 void OnRendererHidden();
546 void OnRendererVisible(); 548 void OnRendererVisible();
547 549
550 void RecordPurgeAndSuspendMetrics() const;
551
548 void ReleaseFreeMemory(); 552 void ReleaseFreeMemory();
549 553
550 void OnSyncMemoryPressure( 554 void OnSyncMemoryPressure(
551 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 555 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
552 556
553 std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( 557 std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
554 int routing_id); 558 int routing_id);
555 559
556 void OnRendererInterfaceRequest(mojom::RendererAssociatedRequest request); 560 void OnRendererInterfaceRequest(mojom::RendererAssociatedRequest request);
557 561
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 739
736 mojom::StoragePartitionServicePtr storage_partition_service_; 740 mojom::StoragePartitionServicePtr storage_partition_service_;
737 741
738 AssociatedInterfaceRegistryImpl associated_interfaces_; 742 AssociatedInterfaceRegistryImpl associated_interfaces_;
739 743
740 mojo::AssociatedBinding<mojom::Renderer> renderer_binding_; 744 mojo::AssociatedBinding<mojom::Renderer> renderer_binding_;
741 745
742 mojom::RenderFrameMessageFilterAssociatedPtr render_frame_message_filter_; 746 mojom::RenderFrameMessageFilterAssociatedPtr render_frame_message_filter_;
743 mojom::RenderMessageFilterAssociatedPtr render_message_filter_; 747 mojom::RenderMessageFilterAssociatedPtr render_message_filter_;
744 748
749 base::CancelableClosure record_purge_suspend_metric_closure_;
745 bool is_renderer_suspended_; 750 bool is_renderer_suspended_;
746 751
747 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 752 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
748 }; 753 };
749 754
750 #if defined(COMPILER_MSVC) 755 #if defined(COMPILER_MSVC)
751 #pragma warning(pop) 756 #pragma warning(pop)
752 #endif 757 #endif
753 758
754 } // namespace content 759 } // namespace content
755 760
756 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 761 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698