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

Unified Diff: chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h

Issue 2946683002: [GRC] Tab CPU Usage Observer (Closed)
Patch Set: Add unittest Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
diff --git a/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h b/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
index 16d9e7c7bc16633268e1976a90f8eb1551977819..5a0bd150662a762479e016f62d4499a462c1d000 100644
--- a/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
+++ b/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_RESOURCE_COORDINATOR_RESOURCE_COORDINATOR_WEB_CONTENTS_OBSERVER_H_
#define CHROME_BROWSER_RESOURCE_COORDINATOR_RESOURCE_COORDINATOR_WEB_CONTENTS_OBSERVER_H_
+#include <stdint.h>
+
#include <memory>
#include "base/macros.h"
@@ -13,6 +15,11 @@
#include "services/resource_coordinator/public/cpp/resource_coordinator_interface.h"
#include "services/resource_coordinator/public/interfaces/service_callbacks.mojom.h"
+namespace ukm {
+typedef int64_t SourceId;
+class UkmEntryBuilder;
+} // namespace ukm
+
class ResourceCoordinatorWebContentsObserver
: public content::WebContentsObserver,
public content::WebContentsUserData<
@@ -36,6 +43,7 @@ class ResourceCoordinatorWebContentsObserver
void EnsureUkmRecorderInterface();
void MaybeSetUkmRecorderInterface(bool ukm_recorder_already_initialized);
+ void UpdateUkmRecorder();
private:
explicit ResourceCoordinatorWebContentsObserver(
@@ -46,6 +54,8 @@ class ResourceCoordinatorWebContentsObserver
std::unique_ptr<resource_coordinator::ResourceCoordinatorInterface>
tab_resource_coordinator_;
+ ukm::SourceId ukm_source_id_;
+ std::string url_;
resource_coordinator::mojom::ServiceCallbacksPtr service_callbacks_;
« no previous file with comments | « no previous file | chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698