Files
Pavel Beloborodov e937963c71 Disable cosmetic filtering on Speedreader pages (#25692)
* Disabled cosmetic filters on speedreader pages.
2024-12-06 11:55:00 +07:00

32 lines
1008 B
C++

/* Copyright (c) 2022 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */
#ifndef BRAVE_COMPONENTS_SPEEDREADER_SPEEDREADER_DELEGATE_H_
#define BRAVE_COMPONENTS_SPEEDREADER_SPEEDREADER_DELEGATE_H_
#include <string>
namespace speedreader {
enum class DistillationResult : int;
// SpeedreaderDelegate is an interface for the speedreader component to
// notify a tab_helper.
class SpeedreaderDelegate {
public:
virtual bool IsPageDistillationAllowed() = 0;
virtual bool IsPageContentPresent() = 0;
virtual std::string TakePageContent() = 0;
virtual void OnDistillComplete(DistillationResult result) = 0;
virtual void OnDistilledDocumentSent() = 0;
protected:
virtual ~SpeedreaderDelegate() = default;
};
} // namespace speedreader
#endif // BRAVE_COMPONENTS_SPEEDREADER_SPEEDREADER_DELEGATE_H_