Skip to content

Commit

Permalink
Remove DISALLOW_COPY_AND_ASSIGN from blink/renderer/core/page
Browse files Browse the repository at this point in the history
Bug: 1010217
Change-Id: Icae743ab8338141dd1d1fc89e55ea621cdf5bad1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2955302
Commit-Queue: Timothy Gu <timothygu@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#891757}
  • Loading branch information
TimothyGu authored and Chromium LUCI CQ committed Jun 11, 2021
1 parent 855f404 commit 4b00900
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 36 deletions.
4 changes: 2 additions & 2 deletions third_party/blink/renderer/core/page/chrome_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ class TextAutosizerPageInfo;
using CompositorElementId = cc::ElementId;

class CORE_EXPORT ChromeClient : public GarbageCollected<ChromeClient> {
DISALLOW_COPY_AND_ASSIGN(ChromeClient);

public:
ChromeClient(const ChromeClient&) = delete;
ChromeClient& operator=(const ChromeClient&) = delete;
virtual ~ChromeClient() = default;

virtual WebViewImpl* GetWebView() const = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_CONTEXT_MENU_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_CONTEXT_MENU_CONTROLLER_H_

#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/common/input/web_menu_source_type.h"
#include "third_party/blink/public/mojom/context_menu/context_menu.mojom-blink.h"
Expand All @@ -49,6 +48,8 @@ class CORE_EXPORT ContextMenuController final
public mojom::blink::ContextMenuClient {
public:
explicit ContextMenuController(Page*);
ContextMenuController(const ContextMenuController&) = delete;
ContextMenuController operator=(const ContextMenuController&) = delete;
~ContextMenuController() override;
void Trace(Visitor*) const;

Expand Down Expand Up @@ -138,8 +139,6 @@ class CORE_EXPORT ContextMenuController final
Member<ContextMenuProvider> menu_provider_;
HitTestResult hit_test_result_;
Member<Node> image_selection_cached_result_;

DISALLOW_COPY_AND_ASSIGN(ContextMenuController);
};

} // namespace blink
Expand Down
4 changes: 2 additions & 2 deletions third_party/blink/renderer/core/page/drag_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_DRAG_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_DRAG_CONTROLLER_H_

#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/events/event_target.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
Expand Down Expand Up @@ -57,6 +56,8 @@ class CORE_EXPORT DragController final
public ExecutionContextLifecycleObserver {
public:
explicit DragController(Page*);
DragController(const DragController&) = delete;
DragController& operator=(const DragController&) = delete;

ui::mojom::blink::DragOperation DragEnteredOrUpdated(DragData*,
LocalFrame& local_root);
Expand Down Expand Up @@ -139,7 +140,6 @@ class CORE_EXPORT DragController final

DragDestinationAction drag_destination_action_;
bool did_initiate_drag_;
DISALLOW_COPY_AND_ASSIGN(DragController);
};

} // namespace blink
Expand Down
6 changes: 3 additions & 3 deletions third_party/blink/renderer/core/page/drag_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <memory>

#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/geometry/float_size.h"
#include "third_party/blink/renderer/platform/geometry/int_size.h"
Expand Down Expand Up @@ -62,6 +61,9 @@ class CORE_EXPORT DragImage {
const String& label,
const FontDescription& system_font,
float device_scale_factor);

DragImage(const DragImage&) = delete;
DragImage& operator=(const DragImage&) = delete;
~DragImage();

static FloatSize ClampedImageScale(const IntSize&,
Expand All @@ -80,8 +82,6 @@ class CORE_EXPORT DragImage {
SkBitmap bitmap_;
float resolution_scale_;
InterpolationQuality interpolation_quality_;

DISALLOW_COPY_AND_ASSIGN(DragImage);
};

} // namespace blink
Expand Down
6 changes: 2 additions & 4 deletions third_party/blink/renderer/core/page/drag_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_DRAG_STATE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_DRAG_STATE_H_

#include "base/macros.h"
#include "third_party/blink/renderer/core/page/drag_actions.h"
#include "third_party/blink/renderer/platform/heap/handle.h"

Expand All @@ -38,6 +37,8 @@ class Node;
class DragState final : public GarbageCollected<DragState> {
public:
DragState() = default;
DragState(const DragState&) = delete;
DragState& operator=(const DragState&) = delete;

// Element that may be a drag source, for the current mouse gesture.
Member<Node> drag_src_;
Expand All @@ -49,9 +50,6 @@ class DragState final : public GarbageCollected<DragState> {
visitor->Trace(drag_src_);
visitor->Trace(drag_data_transfer_);
}

private:
DISALLOW_COPY_AND_ASSIGN(DragState);
};

} // namespace blink
Expand Down
4 changes: 2 additions & 2 deletions third_party/blink/renderer/core/page/focus_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_FOCUS_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_FOCUS_CONTROLLER_H_

#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink-forward.h"
#include "third_party/blink/renderer/core/core_export.h"
Expand Down Expand Up @@ -54,6 +53,8 @@ class CORE_EXPORT FocusController final
using OwnerMap = HeapHashMap<Member<ContainerNode>, Member<Element>>;

explicit FocusController(Page*);
FocusController(const FocusController&) = delete;
FocusController& operator=(const FocusController&) = delete;

void SetFocusedFrame(Frame*, bool notify_embedder = true);
void FocusDocumentView(Frame*, bool notify_embedder = true);
Expand Down Expand Up @@ -129,7 +130,6 @@ class CORE_EXPORT FocusController final
bool is_changing_focused_frame_;
bool is_emulating_focus_;
HeapHashSet<WeakMember<FocusChangedObserver>> focus_changed_observers_;
DISALLOW_COPY_AND_ASSIGN(FocusController);
};

} // namespace blink
Expand Down
5 changes: 2 additions & 3 deletions third_party/blink/renderer/core/page/frame_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_FRAME_TREE_H_

#include "base/dcheck_is_on.h"
#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
Expand All @@ -37,6 +36,8 @@ class CORE_EXPORT FrameTree final {

public:
explicit FrameTree(Frame* this_frame);
FrameTree(const FrameTree&) = delete;
FrameTree& operator=(const FrameTree&) = delete;
~FrameTree();

const AtomicString& GetName() const;
Expand Down Expand Up @@ -109,8 +110,6 @@ class CORE_EXPORT FrameTree final {

// TODO(shuuran): remove this once we have gathered the data
bool cross_site_cross_browsing_context_group_set_nulled_name_;

DISALLOW_COPY_AND_ASSIGN(FrameTree);
};

} // namespace blink
Expand Down
5 changes: 2 additions & 3 deletions third_party/blink/renderer/core/page/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <memory>

#include "base/dcheck_is_on.h"
#include "base/macros.h"
#include "base/types/pass_key.h"
#include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/frame/text_autosizer_page_info.mojom-blink.h"
Expand Down Expand Up @@ -118,6 +117,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
ChromeClient& chrome_client,
scheduler::WebAgentGroupScheduler& agent_group_scheduler,
bool is_ordinary);
Page(const Page&) = delete;
Page& operator=(const Page&) = delete;
~Page() override;

void CloseSoon();
Expand Down Expand Up @@ -496,8 +497,6 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
mojom::blink::TextAutosizerPageInfo web_text_autosizer_page_info_;

WebScopedVirtualTimePauser history_navigation_virtual_time_pauser_;

DISALLOW_COPY_AND_ASSIGN(Page);
};

extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>;
Expand Down
5 changes: 2 additions & 3 deletions third_party/blink/renderer/core/page/plugin_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_DATA_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_DATA_H_

#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
Expand Down Expand Up @@ -93,6 +92,8 @@ class CORE_EXPORT PluginData final : public GarbageCollected<PluginData> {
void Trace(Visitor*) const;

PluginData() = default;
PluginData(const PluginData&) = delete;
PluginData& operator=(const PluginData&) = delete;

const HeapVector<Member<PluginInfo>>& Plugins() const { return plugins_; }
const HeapVector<Member<MimeClassInfo>>& Mimes() const { return mimes_; }
Expand All @@ -112,8 +113,6 @@ class CORE_EXPORT PluginData final : public GarbageCollected<PluginData> {
HeapVector<Member<PluginInfo>> plugins_;
HeapVector<Member<MimeClassInfo>> mimes_;
scoped_refptr<const SecurityOrigin> main_frame_origin_;

DISALLOW_COPY_AND_ASSIGN(PluginData);
};

} // namespace blink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_SCRIPT_FORBIDDEN_SCOPE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_SCRIPT_FORBIDDEN_SCOPE_H_

#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

Expand Down Expand Up @@ -43,12 +42,12 @@ class CORE_EXPORT PluginScriptForbiddenScope final {

public:
PluginScriptForbiddenScope();
PluginScriptForbiddenScope(const PluginScriptForbiddenScope&) = delete;
PluginScriptForbiddenScope& operator=(const PluginScriptForbiddenScope&) =
delete;
~PluginScriptForbiddenScope();

static bool IsForbidden();

private:
DISALLOW_COPY_AND_ASSIGN(PluginScriptForbiddenScope);
};

} // namespace blink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_POINTER_LOCK_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_POINTER_LOCK_CONTROLLER_H_

#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/mojom/input/pointer_lock_context.mojom-blink.h"
#include "third_party/blink/public/mojom/input/pointer_lock_result.mojom-blink-forward.h"
Expand Down Expand Up @@ -54,6 +53,8 @@ class CORE_EXPORT PointerLockController final
: public GarbageCollected<PointerLockController> {
public:
explicit PointerLockController(Page*);
PointerLockController(const PointerLockController&) = delete;
PointerLockController& operator=(const PointerLockController&) = delete;

using ResultCallback =
base::OnceCallback<void(mojom::blink::PointerLockResult)>;
Expand Down Expand Up @@ -124,8 +125,6 @@ class CORE_EXPORT PointerLockController final
FloatPoint pointer_lock_screen_position_;

bool current_unadjusted_movement_setting_ = false;

DISALLOW_COPY_AND_ASSIGN(PointerLockController);
};

} // namespace blink
Expand Down
4 changes: 2 additions & 2 deletions third_party/blink/renderer/core/page/print_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ class CORE_EXPORT ScopedPrintContext {

public:
explicit ScopedPrintContext(LocalFrame*);
ScopedPrintContext(const ScopedPrintContext&) = delete;
ScopedPrintContext& operator=(const ScopedPrintContext&) = delete;
~ScopedPrintContext();

PrintContext* operator->() const { return context_; }

private:
PrintContext* context_;

DISALLOW_COPY_AND_ASSIGN(ScopedPrintContext);
};

} // namespace blink
Expand Down
4 changes: 2 additions & 2 deletions third_party/blink/renderer/core/page/scoped_page_pauser.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCOPED_PAGE_PAUSER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCOPED_PAGE_PAUSER_H_

#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
Expand All @@ -34,6 +33,8 @@ class CORE_EXPORT ScopedPagePauser final {

public:
explicit ScopedPagePauser();
ScopedPagePauser(const ScopedPagePauser&) = delete;
ScopedPagePauser& operator=(const ScopedPagePauser&) = delete;
~ScopedPagePauser();

private:
Expand All @@ -43,7 +44,6 @@ class CORE_EXPORT ScopedPagePauser final {
static bool IsActive();

std::unique_ptr<ThreadScheduler::RendererPauseHandle> pause_handle_;
DISALLOW_COPY_AND_ASSIGN(ScopedPagePauser);
};

} // namespace blink
Expand Down

0 comments on commit 4b00900

Please sign in to comment.