refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)

This commit is contained in:
Milan Burda 2021-11-03 12:41:45 +01:00 committed by GitHub
parent 2a2a1a834c
commit 65a980c673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
231 changed files with 918 additions and 576 deletions

View file

@ -147,6 +147,10 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
~ScriptExecutionCallback() override = default;
// disable copy
ScriptExecutionCallback(const ScriptExecutionCallback&) = delete;
ScriptExecutionCallback& operator=(const ScriptExecutionCallback&) = delete;
void CopyResultToCallingContextAndFinalize(
v8::Isolate* isolate,
const v8::Local<v8::Object>& result) {
@ -248,8 +252,6 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
private:
gin_helper::Promise<v8::Local<v8::Value>> promise_;
CompletionCallback callback_;
DISALLOW_COPY_AND_ASSIGN(ScriptExecutionCallback);
};
class FrameSetSpellChecker : public content::RenderFrameVisitor {
@ -261,6 +263,10 @@ class FrameSetSpellChecker : public content::RenderFrameVisitor {
main_frame->GetWebFrame()->SetSpellCheckPanelHostClient(spell_check_client);
}
// disable copy
FrameSetSpellChecker(const FrameSetSpellChecker&) = delete;
FrameSetSpellChecker& operator=(const FrameSetSpellChecker&) = delete;
bool Visit(content::RenderFrame* render_frame) override {
if (render_frame->GetMainRenderFrame() == main_frame_ ||
(render_frame->IsMainFrame() && render_frame == main_frame_)) {
@ -272,8 +278,6 @@ class FrameSetSpellChecker : public content::RenderFrameVisitor {
private:
SpellCheckClient* spell_check_client_;
content::RenderFrame* main_frame_;
DISALLOW_COPY_AND_ASSIGN(FrameSetSpellChecker);
};
class SpellCheckerHolder final : public content::RenderFrameObserver {