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
|
@ -27,6 +27,10 @@ class LayeredWindowUpdater : public viz::mojom::LayeredWindowUpdater {
|
|||
OnPaintCallback callback);
|
||||
~LayeredWindowUpdater() override;
|
||||
|
||||
// disable copy
|
||||
LayeredWindowUpdater(const LayeredWindowUpdater&) = delete;
|
||||
LayeredWindowUpdater& operator=(const LayeredWindowUpdater&) = delete;
|
||||
|
||||
void SetActive(bool active);
|
||||
|
||||
// viz::mojom::LayeredWindowUpdater implementation.
|
||||
|
@ -43,8 +47,6 @@ class LayeredWindowUpdater : public viz::mojom::LayeredWindowUpdater {
|
|||
#if !defined(WIN32)
|
||||
base::WritableSharedMemoryMapping shm_mapping_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(LayeredWindowUpdater);
|
||||
};
|
||||
|
||||
class OffScreenHostDisplayClient : public viz::HostDisplayClient {
|
||||
|
@ -53,6 +55,11 @@ class OffScreenHostDisplayClient : public viz::HostDisplayClient {
|
|||
OnPaintCallback callback);
|
||||
~OffScreenHostDisplayClient() override;
|
||||
|
||||
// disable copy
|
||||
OffScreenHostDisplayClient(const OffScreenHostDisplayClient&) = delete;
|
||||
OffScreenHostDisplayClient& operator=(const OffScreenHostDisplayClient&) =
|
||||
delete;
|
||||
|
||||
void SetActive(bool active);
|
||||
|
||||
private:
|
||||
|
@ -72,8 +79,6 @@ class OffScreenHostDisplayClient : public viz::HostDisplayClient {
|
|||
std::unique_ptr<LayeredWindowUpdater> layered_window_updater_;
|
||||
OnPaintCallback callback_;
|
||||
bool active_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(OffScreenHostDisplayClient);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -128,6 +128,12 @@ class ElectronDelegatedFrameHostClient
|
|||
explicit ElectronDelegatedFrameHostClient(OffScreenRenderWidgetHostView* view)
|
||||
: view_(view) {}
|
||||
|
||||
// disable copy
|
||||
ElectronDelegatedFrameHostClient(const ElectronDelegatedFrameHostClient&) =
|
||||
delete;
|
||||
ElectronDelegatedFrameHostClient& operator=(
|
||||
const ElectronDelegatedFrameHostClient&) = delete;
|
||||
|
||||
ui::Layer* DelegatedFrameHostGetLayer() const override {
|
||||
return view_->GetRootLayer();
|
||||
}
|
||||
|
@ -163,8 +169,6 @@ class ElectronDelegatedFrameHostClient
|
|||
|
||||
private:
|
||||
OffScreenRenderWidgetHostView* const view_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronDelegatedFrameHostClient);
|
||||
};
|
||||
|
||||
OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
||||
|
|
|
@ -69,6 +69,11 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
gfx::Size initial_size);
|
||||
~OffScreenRenderWidgetHostView() override;
|
||||
|
||||
// disable copy
|
||||
OffScreenRenderWidgetHostView(const OffScreenRenderWidgetHostView&) = delete;
|
||||
OffScreenRenderWidgetHostView& operator=(
|
||||
const OffScreenRenderWidgetHostView&) = delete;
|
||||
|
||||
// content::RenderWidgetHostView:
|
||||
void InitAsChild(gfx::NativeView) override;
|
||||
void SetSize(const gfx::Size&) override;
|
||||
|
@ -290,8 +295,6 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
std::unique_ptr<SkBitmap> backing_;
|
||||
|
||||
base::WeakPtrFactory<OffScreenRenderWidgetHostView> weak_ptr_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(OffScreenRenderWidgetHostView);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -26,6 +26,10 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer {
|
|||
OnPaintCallback callback);
|
||||
~OffScreenVideoConsumer() override;
|
||||
|
||||
// disable copy
|
||||
OffScreenVideoConsumer(const OffScreenVideoConsumer&) = delete;
|
||||
OffScreenVideoConsumer& operator=(const OffScreenVideoConsumer&) = delete;
|
||||
|
||||
void SetActive(bool active);
|
||||
void SetFrameRate(int frame_rate);
|
||||
void SizeChanged();
|
||||
|
@ -49,8 +53,6 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer {
|
|||
std::unique_ptr<viz::ClientFrameSinkVideoCapturer> video_capturer_;
|
||||
|
||||
base::WeakPtrFactory<OffScreenVideoConsumer> weak_ptr_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(OffScreenVideoConsumer);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue