Remove DISALLOW_ macro from libcef/ (see issue #3234)

Also perform related C++ cleanup:
- Use =default instead of {} for default implementations of
  constructors/destructors.
- Replace typedef with using.
This commit is contained in:
Marshall Greenblatt
2021-12-06 15:40:25 -05:00
parent 83ffc1f00d
commit 9484d6528c
205 changed files with 944 additions and 542 deletions

View File

@@ -39,6 +39,9 @@ class ClientViewEx : public views::ClientView {
DCHECK(window_delegate_);
}
ClientViewEx(const ClientViewEx&) = delete;
ClientViewEx& operator=(const ClientViewEx&) = delete;
views::CloseRequestResult OnWindowCloseRequested() override {
return window_delegate_->CanWidgetClose()
? views::CloseRequestResult::kCanClose
@@ -47,8 +50,6 @@ class ClientViewEx : public views::ClientView {
private:
CefWindowView::Delegate* window_delegate_; // Not owned by this object.
DISALLOW_COPY_AND_ASSIGN(ClientViewEx);
};
// Extend NativeFrameView with draggable region handling.
@@ -57,6 +58,9 @@ class NativeFrameViewEx : public views::NativeFrameView {
NativeFrameViewEx(views::Widget* widget, CefWindowView* view)
: views::NativeFrameView(widget), widget_(widget), view_(view) {}
NativeFrameViewEx(const NativeFrameViewEx&) = delete;
NativeFrameViewEx& operator=(const NativeFrameViewEx&) = delete;
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override {
#if defined(OS_WIN)
@@ -93,8 +97,6 @@ class NativeFrameViewEx : public views::NativeFrameView {
// Not owned by this object.
views::Widget* widget_;
CefWindowView* view_;
DISALLOW_COPY_AND_ASSIGN(NativeFrameViewEx);
};
// The area inside the frame border that can be clicked and dragged for resizing
@@ -112,6 +114,9 @@ class CaptionlessFrameView : public views::NonClientFrameView {
CaptionlessFrameView(views::Widget* widget, CefWindowView* view)
: widget_(widget), view_(view) {}
CaptionlessFrameView(const CaptionlessFrameView&) = delete;
CaptionlessFrameView& operator=(const CaptionlessFrameView&) = delete;
gfx::Rect GetBoundsForClientView() const override {
return client_view_bounds_;
}
@@ -222,8 +227,6 @@ class CaptionlessFrameView : public views::NonClientFrameView {
// The bounds of the client view, in this view's coordinates.
gfx::Rect client_view_bounds_;
DISALLOW_COPY_AND_ASSIGN(CaptionlessFrameView);
};
bool IsWindowBorderHit(int code) {