process_node_source.h 899 B

12345678910111213141516171819202122232425
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_PERFORMANCE_MANAGER_PROCESS_NODE_SOURCE_H_
  5. #define COMPONENTS_PERFORMANCE_MANAGER_PROCESS_NODE_SOURCE_H_
  6. namespace performance_manager {
  7. class ProcessNodeImpl;
  8. // Represents a source of existing process nodes that lives on the main thread.
  9. // In practice, this is used by the worker watchers as an abstraction over the
  10. // peformance_manager::RenderProcessUserData to make testing easier.
  11. class ProcessNodeSource {
  12. public:
  13. virtual ~ProcessNodeSource() = default;
  14. // Retrieves the process node associated with the |render_process_id|.
  15. virtual ProcessNodeImpl* GetProcessNode(int render_process_id);
  16. };
  17. } // namespace performance_manager
  18. #endif // COMPONENTS_PERFORMANCE_MANAGER_PROCESS_NODE_SOURCE_H_