blob: 52f53a115df02f0d49710e4d50c2f2f8fd4df2f1 [file] [log] [blame]
// 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.
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_CONTENT_CAPTURE_CLIENT_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_CONTENT_CAPTURE_CLIENT_H_
#include <vector>
#include "base/memory/scoped_refptr.h"
#include "base/time/time.h"
#include "cc/paint/node_holder.h"
namespace blink {
class WebContentHolder;
// This interface is called by ContentCaptureManager to talk to the embedder,
// the ContentCapture is disabled without implementation of this interface.
class WebContentCaptureClient {
public:
virtual cc::NodeHolder::Type GetNodeHolderType() const = 0;
// Adjusts the ContentCaptureTask delay time, has no effect for the existing
// tasks.
virtual void GetTaskTimingParameters(base::TimeDelta& short_delay,
base::TimeDelta& long_delay) const = 0;
// Invoked when a list of |content| is captured, |first_content| indicates if
// this is first captured content in the current document.
virtual void DidCaptureContent(
const std::vector<scoped_refptr<WebContentHolder>>& content,
bool first_data) = 0;
// Invoked when a list of |content| is updated.
virtual void DidUpdateContent(
const std::vector<scoped_refptr<WebContentHolder>>& content) = 0;
// Invoked when the previously captured content is removed, |content_ids| is a
// list of removed content id.
virtual void DidRemoveContent(const std::vector<int64_t>& content_ids) = 0;
protected:
virtual ~WebContentCaptureClient() = default;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_CONTENT_CAPTURE_CLIENT_H_