refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)
This commit is contained in:
parent
2a2a1a834c
commit
65a980c673
231 changed files with 918 additions and 576 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/feature_list.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
|
|
|
@ -36,6 +36,10 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient,
|
|||
v8::Local<v8::Object> provider);
|
||||
~SpellCheckClient() override;
|
||||
|
||||
// disable copy
|
||||
SpellCheckClient(const SpellCheckClient&) = delete;
|
||||
SpellCheckClient& operator=(const SpellCheckClient&) = delete;
|
||||
|
||||
private:
|
||||
class SpellcheckRequest;
|
||||
// blink::WebTextCheckClient:
|
||||
|
@ -103,8 +107,6 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient,
|
|||
v8::Global<v8::Context> context_;
|
||||
v8::Global<v8::Object> provider_;
|
||||
v8::Global<v8::Function> spell_check_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SpellCheckClient);
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue