// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CONTENT_CAPTURE_TASK_SESSION_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_CONTENT_CAPTURE_TASK_SESSION_H_ #include <optional> #include <utility> #include "base/functional/callback.h" #include "base/memory/scoped_refptr.h" #include "cc/paint/node_id.h" #include "third_party/blink/public/platform/web_vector.h" #include "third_party/blink/renderer/core/content_capture/content_holder.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/heap/member.h" #include "third_party/blink/renderer/platform/wtf/vector.h" namespace blink { class Document; // This class wraps the captured content and the detached nodes that need to be // sent out by the ContentCaptureTask, it has a Document to DocumentSession // mapping, and all data is grouped by document. There are two sources of data: // // One is the captured content which is set by the ContentCaptureTask through // SetCapturedContent() only if the task session is empty, i.e all data must be // sent before capturing the on-screen content, the captured content is then // grouped into DocumentSession. // // Another is the detached nodes which are set by the ContentCaptureManager, // they are saved to the DocumentSession directly. // // ContentCaptureTask gets the data per document by using // GetUnsentDocumentSession() and GetNextUnsentNode(), and must send // all data out before capturing on-screen content again. class TaskSession final : public GarbageCollected<TaskSession> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_CONTENT_CAPTURE_TASK_SESSION_H_