1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37

android_webview / browser / tracing / aw_tracing_delegate.h [blame]

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ANDROID_WEBVIEW_BROWSER_TRACING_AW_TRACING_DELEGATE_H_
#define ANDROID_WEBVIEW_BROWSER_TRACING_AW_TRACING_DELEGATE_H_

#include <optional>

#include "content/public/browser/tracing_delegate.h"

class PrefRegistrySimple;
namespace tracing {
class BackgroundTracingStateManager;
}

namespace android_webview {

class AwTracingDelegate : public content::TracingDelegate {
 public:
  AwTracingDelegate();
  explicit AwTracingDelegate(
      std::unique_ptr<tracing::BackgroundTracingStateManager> state_manager);
  ~AwTracingDelegate() override;

  static void RegisterPrefs(PrefRegistrySimple* registry);

  // content::TracingDelegate implementation:
  bool IsRecordingAllowed(bool requires_anonymized_data) const override;

 private:
  std::unique_ptr<tracing::BackgroundTracingStateManager> state_manager_;
};

}  // namespace android_webview

#endif  // ANDROID_WEBVIEW_BROWSER_TRACING_AW_TRACING_DELEGATE_H_