| # Copyright 2019 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//third_party/protobuf/proto_library.gni") |
| |
| proto_library("site_data_proto") { |
| sources = [ "persistence/site_data/site_data.proto" ] |
| } |
| |
| static_library("performance_manager") { |
| sources = [ |
| "decorators/page_live_state_decorator.cc", |
| "decorators/page_load_tracker_decorator.cc", |
| "decorators/page_load_tracker_decorator.h", |
| "decorators/page_load_tracker_decorator_helper.cc", |
| "decorators/tab_properties_decorator.cc", |
| "embedder/binders.cc", |
| "embedder/binders.h", |
| "embedder/performance_manager_lifetime.h", |
| "embedder/performance_manager_registry.h", |
| "frame_priority/boosting_vote_aggregator.cc", |
| "frame_priority/frame_priority.cc", |
| "frame_priority/max_vote_aggregator.cc", |
| "frame_priority/override_vote_aggregator.cc", |
| "graph/frame_node.cc", |
| "graph/frame_node_impl.cc", |
| "graph/frame_node_impl.h", |
| "graph/frame_node_impl_describer.cc", |
| "graph/frame_node_impl_describer.h", |
| "graph/graph.cc", |
| "graph/graph_impl.cc", |
| "graph/graph_impl.h", |
| "graph/graph_impl_operations.cc", |
| "graph/graph_impl_operations.h", |
| "graph/graph_operations.cc", |
| "graph/graph_registered.cc", |
| "graph/node.cc", |
| "graph/node_attached_data.cc", |
| "graph/node_attached_data.h", |
| "graph/node_attached_data_impl.h", |
| "graph/node_base.cc", |
| "graph/node_base.h", |
| "graph/node_data_describer.cc", |
| "graph/node_type.h", |
| "graph/page_node.cc", |
| "graph/page_node_impl.cc", |
| "graph/page_node_impl.h", |
| "graph/page_node_impl_describer.cc", |
| "graph/page_node_impl_describer.h", |
| "graph/policies/process_priority_policy.cc", |
| "graph/policies/process_priority_policy.h", |
| "graph/policies/tab_loading_frame_navigation_policy.cc", |
| "graph/process_node.cc", |
| "graph/process_node_impl.cc", |
| "graph/process_node_impl.h", |
| "graph/process_node_impl_describer.cc", |
| "graph/process_node_impl_describer.h", |
| "graph/properties.h", |
| "graph/system_node.cc", |
| "graph/system_node_impl.cc", |
| "graph/system_node_impl.h", |
| "graph/worker_node.cc", |
| "graph/worker_node_impl.cc", |
| "graph/worker_node_impl.h", |
| "graph/worker_node_impl_describer.cc", |
| "graph/worker_node_impl_describer.h", |
| "performance_manager.cc", |
| "performance_manager_feature_observer_client.cc", |
| "performance_manager_feature_observer_client.h", |
| "performance_manager_impl.cc", |
| "performance_manager_impl.h", |
| "performance_manager_lifetime.cc", |
| "performance_manager_registry.cc", |
| "performance_manager_registry_impl.cc", |
| "performance_manager_registry_impl.h", |
| "performance_manager_tab_helper.cc", |
| "performance_manager_tab_helper.h", |
| "process_node_source.cc", |
| "process_node_source.h", |
| "public/decorators/page_live_state_decorator.h", |
| "public/decorators/page_load_tracker_decorator_helper.h", |
| "public/decorators/tab_properties_decorator.h", |
| "public/frame_priority/boosting_vote_aggregator.h", |
| "public/frame_priority/frame_priority.h", |
| "public/frame_priority/max_vote_aggregator.h", |
| "public/frame_priority/override_vote_aggregator.h", |
| "public/graph/frame_node.h", |
| "public/graph/graph.h", |
| "public/graph/graph_operations.h", |
| "public/graph/graph_registered.h", |
| "public/graph/node.h", |
| "public/graph/node_attached_data.h", |
| "public/graph/node_data_describer.h", |
| "public/graph/node_data_describer_registry.h", |
| "public/graph/node_data_describer_util.cc", |
| "public/graph/node_data_describer_util.h", |
| "public/graph/page_node.h", |
| "public/graph/policies/background_tab_loading_policy.h", |
| "public/graph/policies/tab_loading_frame_navigation_policy.h", |
| "public/graph/process_node.h", |
| "public/graph/system_node.h", |
| "public/graph/worker_node.h", |
| "public/performance_manager.h", |
| "public/performance_manager_main_thread_observer.h", |
| "public/render_frame_host_proxy.h", |
| "public/render_process_host_proxy.h", |
| "public/web_contents_proxy.h", |
| "render_frame_host_proxy.cc", |
| "render_process_host_proxy.cc", |
| "render_process_user_data.cc", |
| "render_process_user_data.h", |
| "service_worker_context_adapter.cc", |
| "service_worker_context_adapter.h", |
| "tab_helper_frame_node_source.cc", |
| "tab_helper_frame_node_source.h", |
| "web_contents_proxy.cc", |
| "web_contents_proxy_impl.cc", |
| "web_contents_proxy_impl.h", |
| "worker_watcher.cc", |
| "worker_watcher.h", |
| ] |
| public_deps = [ |
| "//base", |
| "//base/allocator:buildflags", |
| "//components/performance_manager/public/mojom", |
| "//content/public/browser", |
| "//services/metrics/public/cpp:metrics_cpp", |
| "//url", |
| ] |
| |
| if (!is_android) { |
| sources += [ |
| "persistence/site_data/exponential_moving_average.cc", |
| "persistence/site_data/exponential_moving_average.h", |
| "persistence/site_data/feature_usage.h", |
| "persistence/site_data/leveldb_site_data_store.cc", |
| "persistence/site_data/leveldb_site_data_store.h", |
| "persistence/site_data/non_recording_site_data_cache.cc", |
| "persistence/site_data/non_recording_site_data_cache.h", |
| "persistence/site_data/noop_site_data_writer.cc", |
| "persistence/site_data/noop_site_data_writer.h", |
| "persistence/site_data/site_data_cache.h", |
| "persistence/site_data/site_data_cache_factory.cc", |
| "persistence/site_data/site_data_cache_factory.h", |
| "persistence/site_data/site_data_cache_impl.cc", |
| "persistence/site_data/site_data_cache_impl.h", |
| "persistence/site_data/site_data_cache_inspector.h", |
| "persistence/site_data/site_data_impl.cc", |
| "persistence/site_data/site_data_impl.h", |
| "persistence/site_data/site_data_reader.cc", |
| "persistence/site_data/site_data_reader.h", |
| "persistence/site_data/site_data_store.h", |
| "persistence/site_data/site_data_writer.cc", |
| "persistence/site_data/site_data_writer.h", |
| "persistence/site_data/tab_visibility.h", |
| ] |
| |
| public_deps += [ |
| ":site_data_proto", |
| "//third_party/leveldatabase", |
| ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "decorators/decorators_utils_unittest.cc", |
| "decorators/page_live_state_decorator_unittest.cc", |
| "decorators/page_load_tracker_decorator_unittest.cc", |
| "decorators/tab_properties_decorator_unittest.cc", |
| "frame_priority/boosting_vote_aggregator_unittest.cc", |
| "frame_priority/frame_priority_unittest.cc", |
| "frame_priority/max_vote_aggregator_unittest.cc", |
| "frame_priority/override_vote_aggregator_unittest.cc", |
| "graph/frame_node_impl_unittest.cc", |
| "graph/graph_impl_operations_unittest.cc", |
| "graph/graph_impl_unittest.cc", |
| "graph/graph_operations_unittest.cc", |
| "graph/graph_registered_unittest.cc", |
| "graph/node_attached_data_unittest.cc", |
| "graph/node_base_unittest.cc", |
| "graph/page_node_impl_unittest.cc", |
| "graph/policies/process_priority_policy_unittest.cc", |
| "graph/policies/tab_loading_frame_navigation_policy_unittest.cc", |
| "graph/process_node_impl_unittest.cc", |
| "graph/properties_unittest.cc", |
| "graph/system_node_impl_unittest.cc", |
| "graph/worker_node_impl_unittest.cc", |
| "performance_manager_impl_unittest.cc", |
| "performance_manager_registry_impl_unittest.cc", |
| "performance_manager_tab_helper_unittest.cc", |
| "performance_manager_unittest.cc", |
| "web_contents_proxy_unittest.cc", |
| "worker_watcher_unittest.cc", |
| ] |
| |
| deps = [ |
| ":performance_manager", |
| "test_support:test_support", |
| "test_support:test_support_common", |
| "//base/test:test_support", |
| "//content/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| # The site data database isn't supported on Android. |
| if (!is_android) { |
| sources += [ |
| "persistence/site_data/exponential_moving_average_unittest.cc", |
| "persistence/site_data/leveldb_site_data_store_unittest.cc", |
| "persistence/site_data/non_recording_site_data_cache_unittest.cc", |
| "persistence/site_data/site_data_cache_factory_unittest.cc", |
| "persistence/site_data/site_data_cache_impl_unittest.cc", |
| "persistence/site_data/site_data_impl_unittest.cc", |
| "persistence/site_data/site_data_reader_unittest.cc", |
| "persistence/site_data/site_data_writer_unittest.cc", |
| "persistence/site_data/unittest_utils.cc", |
| "persistence/site_data/unittest_utils.h", |
| ] |
| } |
| } |
| |
| source_set("browser_tests") { |
| testonly = true |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| |
| sources = [ |
| "performance_manager_browsertest.cc", |
| "render_process_host_proxy_browsertest.cc", |
| ] |
| |
| deps = [ |
| ":performance_manager", |
| "test_support:browsertest_support", |
| "test_support:test_support_common", |
| "//base/test:test_support", |
| "//content/shell:content_shell_lib", |
| "//content/test:browsertest_support", |
| "//content/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |