Commit 4a1a9d3d authored by Stuart Langley's avatar Stuart Langley Committed by Commit Bot

Replace transitive includes of WTF_MAKE_NONCOPYABLE with DISALLOW_COPY_AND_ASSIGN.

There are many places where WTF_MAKE_NONCOPYABLE is transitively defined. This
CL starts replacing these uses with DISALLOW_COPY_AND_ASSIGN and includes
base/macros.h as required.

Where required the declaration of DISALLOW_COPY_AND_ASSIGN is moved to
the end of the class definition.

Also, take the opportunity to use "= default" rather than {} for
ctors and dtors, in line with recent discussions on chromium-cxx@.

There are no logic changes in this CL.

Bug: 565932
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Idc53c473b134277cc2a079704648f99b3f9d47f1
Reviewed-on: https://chromium-review.googlesource.com/791870Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Stuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519533}
parent 8a160ce4
......@@ -7,6 +7,7 @@
#include <memory>
#include "base/macros.h"
#include "core/CoreExport.h"
#include "platform/wtf/Functional.h"
#include "platform/wtf/ThreadingPrimitives.h"
......@@ -20,7 +21,6 @@ class ScriptStreamer;
// A singleton thread for running background tasks for script streaming.
class CORE_EXPORT ScriptStreamerThread {
USING_FAST_MALLOC(ScriptStreamerThread);
WTF_MAKE_NONCOPYABLE(ScriptStreamerThread);
public:
static void Init();
......@@ -51,6 +51,8 @@ class CORE_EXPORT ScriptStreamerThread {
std::unique_ptr<WebThread> thread_;
bool running_task_;
mutable Mutex mutex_; // Guards m_runningTask.
DISALLOW_COPY_AND_ASSIGN(ScriptStreamerThread);
};
} // namespace blink
......
......@@ -24,7 +24,6 @@ class {{ agent | agent_name_to_class }};
{% endfor %}
class {{export_symbol}} {{sink_class}} : public GarbageCollectedFinalized<{{sink_class}}> {
WTF_MAKE_NONCOPYABLE({{sink_class}});
public:
enum AgentType : unsigned {
......@@ -35,6 +34,9 @@ class {{export_symbol}} {{sink_class}} : public GarbageCollectedFinalized<{{sink
{{sink_class}}();
~{{sink_class}}();
{{sink_class}} (const {{sink_class}}&) = delete;
{{sink_class}}& operator=(const {{sink_class}}&) = delete;
void Trace(Visitor*);
{% for agent in agents %}
......
......@@ -5,6 +5,7 @@
#ifndef DraggedIsolatedFileSystem_h
#define DraggedIsolatedFileSystem_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Forward.h"
......@@ -14,11 +15,9 @@ namespace blink {
class DataObject;
class CORE_EXPORT DraggedIsolatedFileSystem {
WTF_MAKE_NONCOPYABLE(DraggedIsolatedFileSystem);
public:
DraggedIsolatedFileSystem() {}
virtual ~DraggedIsolatedFileSystem() {}
DraggedIsolatedFileSystem() = default;
virtual ~DraggedIsolatedFileSystem() = default;
using FileSystemIdPreparationCallback = void (*)(DataObject*);
static void Init(FileSystemIdPreparationCallback);
......@@ -27,6 +26,8 @@ class CORE_EXPORT DraggedIsolatedFileSystem {
private:
static FileSystemIdPreparationCallback prepare_callback_;
DISALLOW_COPY_AND_ASSIGN(DraggedIsolatedFileSystem);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef CSPDirective_h
#define CSPDirective_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/text/WTFString.h"
......@@ -15,14 +16,12 @@ class ContentSecurityPolicy;
class CORE_EXPORT CSPDirective
: public GarbageCollectedFinalized<CSPDirective> {
WTF_MAKE_NONCOPYABLE(CSPDirective);
public:
CSPDirective(const String& name,
const String& value,
ContentSecurityPolicy* policy)
: name_(name), text_(name + ' ' + value), policy_(policy) {}
virtual ~CSPDirective() {}
virtual ~CSPDirective() = default;
virtual void Trace(blink::Visitor* visitor) { visitor->Trace(policy_); }
const String& GetName() const { return name_; }
......@@ -35,6 +34,8 @@ class CORE_EXPORT CSPDirective
String name_;
String text_;
Member<ContentSecurityPolicy> policy_;
DISALLOW_COPY_AND_ASSIGN(CSPDirective);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef MediaListDirective_h
#define MediaListDirective_h
#include "base/macros.h"
#include "core/frame/csp/CSPDirective.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/wtf/HashSet.h"
......@@ -15,8 +16,6 @@ namespace blink {
class ContentSecurityPolicy;
class CORE_EXPORT MediaListDirective final : public CSPDirective {
WTF_MAKE_NONCOPYABLE(MediaListDirective);
public:
MediaListDirective(const String& name,
const String& value,
......@@ -38,6 +37,8 @@ class CORE_EXPORT MediaListDirective final : public CSPDirective {
HashSet<String> GetIntersect(const HashSet<String>& other) const;
HashSet<String> plugin_types_;
DISALLOW_COPY_AND_ASSIGN(MediaListDirective);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef MouseWheelEventManager_h
#define MouseWheelEventManager_h
#include "base/macros.h"
#include "platform/heap/Handle.h"
#include "platform/heap/Visitor.h"
#include "public/platform/WebInputEventResult.h"
......@@ -19,8 +20,6 @@ class WebMouseWheelEvent;
class MouseWheelEventManager final
: public GarbageCollectedFinalized<MouseWheelEventManager> {
WTF_MAKE_NONCOPYABLE(MouseWheelEventManager);
public:
explicit MouseWheelEventManager(LocalFrame&);
void Trace(blink::Visitor*);
......@@ -38,6 +37,8 @@ class MouseWheelEventManager final
const Member<LocalFrame> frame_;
Member<Node> wheel_target_;
DISALLOW_COPY_AND_ASSIGN(MouseWheelEventManager);
};
} // namespace blink
......
......@@ -6,6 +6,8 @@
#define ScrollManager_h
#include <deque>
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/page/EventWithHitTestResults.h"
#include "platform/geometry/LayoutSize.h"
......@@ -33,8 +35,6 @@ class WebGestureEvent;
// classes and they call into this class for doing the work.
class CORE_EXPORT ScrollManager
: public GarbageCollectedFinalized<ScrollManager> {
WTF_MAKE_NONCOPYABLE(ScrollManager);
public:
explicit ScrollManager(LocalFrame&);
void Trace(blink::Visitor*);
......@@ -151,6 +151,8 @@ class CORE_EXPORT ScrollManager
LayoutSize
offset_from_resize_corner_; // In the coords of m_resizeScrollableArea.
DISALLOW_COPY_AND_ASSIGN(ScrollManager);
};
} // namespace blink
......
......@@ -31,6 +31,7 @@
#ifndef DOMEditor_h
#define DOMEditor_h
#include "base/macros.h"
#include "core/inspector/protocol/Forward.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/text/WTFString.h"
......@@ -45,8 +46,6 @@ class Node;
class Text;
class DOMEditor final : public GarbageCollected<DOMEditor> {
WTF_MAKE_NONCOPYABLE(DOMEditor);
public:
explicit DOMEditor(InspectorHistory*);
......@@ -96,6 +95,8 @@ class DOMEditor final : public GarbageCollected<DOMEditor> {
class SetNodeValueAction;
Member<InspectorHistory> history_;
DISALLOW_COPY_AND_ASSIGN(DOMEditor);
};
} // namespace blink
......
......@@ -31,6 +31,7 @@
#ifndef DOMPatchSupport_h
#define DOMPatchSupport_h
#include "base/macros.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/HashMap.h"
#include "platform/wtf/Vector.h"
......@@ -46,7 +47,6 @@ class Node;
class DOMPatchSupport final {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(DOMPatchSupport);
public:
DOMPatchSupport(DOMEditor*, Document&);
......@@ -90,6 +90,8 @@ class DOMPatchSupport final {
Member<Document> document_;
UnusedNodesMap unused_nodes_map_;
DISALLOW_COPY_AND_ASSIGN(DOMPatchSupport);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef InspectorAuditsAgent_h
#define InspectorAuditsAgent_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/protocol/Audits.h"
......@@ -13,8 +14,6 @@ namespace blink {
class CORE_EXPORT InspectorAuditsAgent final
: public InspectorBaseAgent<protocol::Audits::Metainfo> {
WTF_MAKE_NONCOPYABLE(InspectorAuditsAgent);
public:
explicit InspectorAuditsAgent(InspectorNetworkAgent*);
~InspectorAuditsAgent() override;
......@@ -32,6 +31,8 @@ class CORE_EXPORT InspectorAuditsAgent final
private:
Member<InspectorNetworkAgent> network_agent_;
DISALLOW_COPY_AND_ASSIGN(InspectorAuditsAgent);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef InspectorEmulationAgent_h
#define InspectorEmulationAgent_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/protocol/Emulation.h"
......@@ -25,8 +26,6 @@ class RGBA;
class CORE_EXPORT InspectorEmulationAgent final
: public InspectorBaseAgent<protocol::Emulation::Metainfo>,
public WebViewScheduler::VirtualTimeObserver {
WTF_MAKE_NONCOPYABLE(InspectorEmulationAgent);
public:
class Client {
public:
......@@ -88,6 +87,8 @@ class CORE_EXPORT InspectorEmulationAgent final
Member<WebLocalFrameImpl> web_local_frame_;
Client* client_;
bool virtual_time_observer_registered_;
DISALLOW_COPY_AND_ASSIGN(InspectorEmulationAgent);
};
} // namespace blink
......
......@@ -31,6 +31,7 @@
#ifndef InspectorHistory_h
#define InspectorHistory_h
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Vector.h"
......@@ -41,8 +42,6 @@ namespace blink {
class ExceptionState;
class InspectorHistory final : public GarbageCollected<InspectorHistory> {
WTF_MAKE_NONCOPYABLE(InspectorHistory);
public:
class Action : public GarbageCollectedFinalized<Action> {
public:
......@@ -81,6 +80,8 @@ class InspectorHistory final : public GarbageCollected<InspectorHistory> {
private:
HeapVector<Member<Action>> history_;
size_t after_last_action_index_;
DISALLOW_COPY_AND_ASSIGN(InspectorHistory);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef InspectorSession_h
#define InspectorSession_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/inspector/protocol/Forward.h"
#include "platform/heap/Handle.h"
......@@ -23,8 +24,6 @@ class CORE_EXPORT InspectorSession
: public GarbageCollectedFinalized<InspectorSession>,
public protocol::FrontendChannel,
public v8_inspector::V8Inspector::Channel {
WTF_MAKE_NONCOPYABLE(InspectorSession);
public:
class Client {
public:
......@@ -87,6 +86,8 @@ class CORE_EXPORT InspectorSession
class Notification;
Vector<std::unique_ptr<Notification>> notification_queue_;
String last_sent_state_;
DISALLOW_COPY_AND_ASSIGN(InspectorSession);
};
} // namespace blink
......
......@@ -7,6 +7,7 @@
#ifndef InspectorTracingAgent_h
#define InspectorTracingAgent_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/protocol/Tracing.h"
......@@ -20,8 +21,6 @@ class InspectorWorkerAgent;
class CORE_EXPORT InspectorTracingAgent final
: public InspectorBaseAgent<protocol::Tracing::Metainfo> {
WTF_MAKE_NONCOPYABLE(InspectorTracingAgent);
public:
class Client {
public:
......@@ -74,6 +73,8 @@ class CORE_EXPORT InspectorTracingAgent final
Client* client_;
Member<InspectorWorkerAgent> worker_agent_;
Member<InspectedFrames> inspected_frames_;
DISALLOW_COPY_AND_ASSIGN(InspectorTracingAgent);
};
} // namespace blink
......
......@@ -26,6 +26,7 @@
#ifndef LayoutGeometryMap_h
#define LayoutGeometryMap_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/layout/LayoutGeometryMapStep.h"
#include "core/layout/MapCoordinatesFlags.h"
......@@ -48,7 +49,6 @@ class TransformState;
// transforms.
class CORE_EXPORT LayoutGeometryMap {
DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(LayoutGeometryMap);
public:
LayoutGeometryMap(MapCoordinatesFlags = kUseTransforms);
......@@ -120,6 +120,8 @@ class CORE_EXPORT LayoutGeometryMap {
LayoutGeometryMapSteps mapping_;
LayoutSize accumulated_offset_;
MapCoordinatesFlags map_coordinates_flags_;
DISALLOW_COPY_AND_ASSIGN(LayoutGeometryMap);
};
} // namespace blink
......
......@@ -20,6 +20,7 @@
#ifndef SVGTextLayoutAttributesBuilder_h
#define SVGTextLayoutAttributesBuilder_h
#include "base/macros.h"
#include "core/layout/svg/SVGCharacterData.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Allocator.h"
......@@ -42,7 +43,6 @@ class SVGTextPositioningElement;
// The second layout phase is carried out by SVGTextLayoutEngine.
class SVGTextLayoutAttributesBuilder {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(SVGTextLayoutAttributesBuilder);
public:
explicit SVGTextLayoutAttributesBuilder(LayoutSVGText&);
......@@ -75,6 +75,8 @@ class SVGTextLayoutAttributesBuilder {
unsigned character_count_;
HeapVector<TextPosition> text_positions_;
SVGCharacterDataMap character_data_map_;
DISALLOW_COPY_AND_ASSIGN(SVGTextLayoutAttributesBuilder);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef FramePainter_h
#define FramePainter_h
#include "base/macros.h"
#include "core/paint/PaintPhase.h"
#include "platform/heap/Handle.h"
......@@ -18,7 +19,6 @@ class Scrollbar;
class FramePainter {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(FramePainter);
public:
explicit FramePainter(const LocalFrameView& frame_view)
......@@ -36,6 +36,8 @@ class FramePainter {
Member<const LocalFrameView> frame_view_;
static bool in_paint_contents_;
DISALLOW_COPY_AND_ASSIGN(FramePainter);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef ScrollbarPainter_h
#define ScrollbarPainter_h
#include "base/macros.h"
#include "platform/heap/Handle.h"
#include "platform/scroll/Scrollbar.h"
......@@ -19,7 +20,6 @@ class LayoutScrollbarPart;
class ScrollbarPainter {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(ScrollbarPainter);
public:
explicit ScrollbarPainter(const LayoutScrollbar& layout_scrollbar)
......@@ -33,6 +33,8 @@ class ScrollbarPainter {
private:
Member<const LayoutScrollbar> layout_scrollbar_;
DISALLOW_COPY_AND_ASSIGN(ScrollbarPainter);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef GridPositionsResolver_h
#define GridPositionsResolver_h
#include "base/macros.h"
#include "core/style/GridPosition.h"
#include "platform/wtf/Allocator.h"
......@@ -24,8 +25,6 @@ enum GridPositionSide {
enum GridTrackSizingDirection { kForColumns, kForRows };
class NamedLineCollection {
WTF_MAKE_NONCOPYABLE(NamedLineCollection);
public:
NamedLineCollection(const ComputedStyle&,
const String& named_line,
......@@ -51,6 +50,8 @@ class NamedLineCollection {
size_t last_line_;
size_t auto_repeat_total_tracks_;
size_t auto_repeat_track_list_length_;
DISALLOW_COPY_AND_ASSIGN(NamedLineCollection);
};
// This is a utility class with all the code related to grid items positions
......
......@@ -21,6 +21,7 @@
#ifndef SVGPathStringSource_h
#define SVGPathStringSource_h
#include "base/macros.h"
#include "core/CoreExport.h"
#include "core/svg/SVGParsingError.h"
#include "core/svg/SVGPathData.h"
......@@ -29,7 +30,6 @@
namespace blink {
class CORE_EXPORT SVGPathStringSource {
WTF_MAKE_NONCOPYABLE(SVGPathStringSource);
STACK_ALLOCATED();
public:
......@@ -64,6 +64,8 @@ class CORE_EXPORT SVGPathStringSource {
SVGPathSegType previous_command_;
SVGParsingError error_;
String string_;
DISALLOW_COPY_AND_ASSIGN(SVGPathStringSource);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef SVGTreeScopeResources_h
#define SVGTreeScopeResources_h
#include "base/macros.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Forward.h"
#include "platform/wtf/HashMap.h"
......@@ -22,8 +23,6 @@ class LayoutSVGResourceContainer;
// element's id (which is used to identify a resource.)
class SVGTreeScopeResources
: public GarbageCollectedFinalized<SVGTreeScopeResources> {
WTF_MAKE_NONCOPYABLE(SVGTreeScopeResources);
public:
explicit SVGTreeScopeResources(TreeScope*);
~SVGTreeScopeResources();
......@@ -59,6 +58,8 @@ class SVGTreeScopeResources
// Resources that are pending.
HeapHashMap<AtomicString, Member<SVGPendingElements>> pending_resources_;
Member<TreeScope> tree_scope_;
DISALLOW_COPY_AND_ASSIGN(SVGTreeScopeResources);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef InspectorAccessibilityAgent_h
#define InspectorAccessibilityAgent_h
#include "base/macros.h"
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/protocol/Accessibility.h"
#include "modules/ModulesExport.h"
......@@ -21,8 +22,6 @@ using protocol::Accessibility::AXNodeId;
class MODULES_EXPORT InspectorAccessibilityAgent
: public InspectorBaseAgent<protocol::Accessibility::Metainfo> {
WTF_MAKE_NONCOPYABLE(InspectorAccessibilityAgent);
public:
InspectorAccessibilityAgent(Page*, InspectorDOMAgent*);
......@@ -87,6 +86,8 @@ class MODULES_EXPORT InspectorAccessibilityAgent
Member<Page> page_;
Member<InspectorDOMAgent> dom_agent_;
DISALLOW_COPY_AND_ASSIGN(InspectorAccessibilityAgent);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef FetchRequestData_h
#define FetchRequestData_h
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
......@@ -27,8 +28,6 @@ class WebServiceWorkerRequest;
class FetchRequestData final
: public GarbageCollectedFinalized<FetchRequestData> {
WTF_MAKE_NONCOPYABLE(FetchRequestData);
public:
enum Tainting { kBasicTainting, kCORSTainting, kOpaqueTainting };
......@@ -132,6 +131,8 @@ class FetchRequestData final
String mime_type_;
String integrity_;
bool keepalive_;
DISALLOW_COPY_AND_ASSIGN(FetchRequestData);
};
} // namespace blink
......
......@@ -6,6 +6,8 @@
#define FetchResponseData_h
#include <memory>
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
......@@ -27,8 +29,6 @@ class WebServiceWorkerResponse;
class MODULES_EXPORT FetchResponseData final
: public GarbageCollectedFinalized<FetchResponseData> {
WTF_MAKE_NONCOPYABLE(FetchResponseData);
public:
// "A response can have an associated termination reason which is one of
// end-user abort, fatal, and timeout."
......@@ -125,6 +125,8 @@ class MODULES_EXPORT FetchResponseData final
Time response_time_;
String cache_storage_cache_name_;
WebHTTPHeaderSet cors_exposed_header_names_;
DISALLOW_COPY_AND_ASSIGN(FetchResponseData);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef ScreenOrientationDispatcher_h
#define ScreenOrientationDispatcher_h
#include "base/macros.h"
#include "core/frame/PlatformEventDispatcher.h"
#include "device/screen_orientation/public/interfaces/screen_orientation.mojom-blink.h"
#include "platform/heap/Handle.h"
......@@ -23,7 +24,6 @@ class ScreenOrientationDispatcher final
: public GarbageCollectedFinalized<ScreenOrientationDispatcher>,
public PlatformEventDispatcher {
USING_GARBAGE_COLLECTED_MIXIN(ScreenOrientationDispatcher);
WTF_MAKE_NONCOPYABLE(ScreenOrientationDispatcher);
public:
static ScreenOrientationDispatcher& Instance();
......@@ -40,6 +40,8 @@ class ScreenOrientationDispatcher final
void StopListening() override;
device::mojom::blink::ScreenOrientationListenerPtr listener_;
DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcher);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef NavigationPreloadCallbacks_h
#define NavigationPreloadCallbacks_h
#include "base/macros.h"
#include "platform/heap/Persistent.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h"
......@@ -26,7 +27,7 @@ class EnableNavigationPreloadCallbacks final
private:
Persistent<ScriptPromiseResolver> resolver_;
WTF_MAKE_NONCOPYABLE(EnableNavigationPreloadCallbacks);
DISALLOW_COPY_AND_ASSIGN(EnableNavigationPreloadCallbacks);
};
class GetNavigationPreloadStateCallbacks final
......@@ -42,7 +43,7 @@ class GetNavigationPreloadStateCallbacks final
private:
Persistent<ScriptPromiseResolver> resolver_;
WTF_MAKE_NONCOPYABLE(GetNavigationPreloadStateCallbacks);
DISALLOW_COPY_AND_ASSIGN(GetNavigationPreloadStateCallbacks);
};
class SetNavigationPreloadHeaderCallbacks final
......@@ -58,7 +59,7 @@ class SetNavigationPreloadHeaderCallbacks final
private:
Persistent<ScriptPromiseResolver> resolver_;
WTF_MAKE_NONCOPYABLE(SetNavigationPreloadHeaderCallbacks);
DISALLOW_COPY_AND_ASSIGN(SetNavigationPreloadHeaderCallbacks);
};
} // namespace blink
......
......@@ -32,6 +32,8 @@
#define ServiceWorkerGlobalScopeProxy_h
#include <memory>
#include "base/macros.h"
#include "core/workers/WorkerReportingProxy.h"
#include "platform/heap/Handle.h"
#include "platform/heap/HeapAllocator.h"
......@@ -68,8 +70,6 @@ class ServiceWorkerGlobalScopeProxy final
: public GarbageCollectedFinalized<ServiceWorkerGlobalScopeProxy>,
public WebServiceWorkerContextProxy,
public WorkerReportingProxy {
WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy);
public:
static ServiceWorkerGlobalScopeProxy* Create(WebEmbeddedWorkerImpl&,
WebServiceWorkerContextClient&);
......@@ -201,6 +201,8 @@ class ServiceWorkerGlobalScopeProxy final
WebServiceWorkerContextClient* client_;
CrossThreadPersistent<ServiceWorkerGlobalScope> worker_global_scope_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerGlobalScopeProxy);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef ServiceWorkerWindowClientCallback_h
#define ServiceWorkerWindowClientCallback_h
#include "base/macros.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
namespace blink {
......@@ -21,7 +22,7 @@ class NavigateClientCallback : public WebServiceWorkerClientCallbacks {
private:
Persistent<ScriptPromiseResolver> resolver_;
WTF_MAKE_NONCOPYABLE(NavigateClientCallback);
DISALLOW_COPY_AND_ASSIGN(NavigateClientCallback);
};
} // namespace blink
......
......@@ -30,6 +30,8 @@
#define DatabaseTracker_h
#include <memory>
#include "base/macros.h"
#include "modules/ModulesExport.h"
#include "modules/webdatabase/DatabaseError.h"
#include "platform/heap/Handle.h"
......@@ -48,7 +50,6 @@ class Page;
class SecurityOrigin;
class MODULES_EXPORT DatabaseTracker {
WTF_MAKE_NONCOPYABLE(DatabaseTracker);
USING_FAST_MALLOC(DatabaseTracker);
public:
......@@ -98,6 +99,8 @@ class MODULES_EXPORT DatabaseTracker {
Mutex open_database_map_guard_;
mutable std::unique_ptr<DatabaseOriginMap> open_database_map_;
DISALLOW_COPY_AND_ASSIGN(DatabaseTracker);
};
} // namespace blink
......
......@@ -27,6 +27,8 @@
#define DragImage_h
#include <memory>
#include "base/macros.h"
#include "platform/geometry/FloatSize.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/GraphicsTypes.h"
......@@ -46,7 +48,6 @@ class KURL;
class PLATFORM_EXPORT DragImage {
USING_FAST_MALLOC(DragImage);
WTF_MAKE_NONCOPYABLE(DragImage);
public:
static std::unique_ptr<DragImage> Create(
......@@ -86,6 +87,8 @@ class PLATFORM_EXPORT DragImage {
SkBitmap bitmap_;
float resolution_scale_;
InterpolationQuality interpolation_quality_;
DISALLOW_COPY_AND_ASSIGN(DragImage);
};
} // namespace blink
......
......@@ -26,6 +26,7 @@
#ifndef KillRing_h
#define KillRing_h
#include "base/macros.h"
#include "platform/PlatformExport.h"
#include "platform/wtf/text/WTFString.h"
......@@ -33,15 +34,16 @@ namespace blink {
class PLATFORM_EXPORT KillRing {
USING_FAST_MALLOC(KillRing);
WTF_MAKE_NONCOPYABLE(KillRing);
public:
KillRing() {}
KillRing() = default;
void Append(const String&);
void Prepend(const String&);
String Yank();
void StartNewSequence();
void SetToYankedState();
DISALLOW_COPY_AND_ASSIGN(KillRing);
};
} // namespace blink
......
......@@ -151,7 +151,6 @@ typedef Vector<BlobDataItem> BlobDataItemList;
class PLATFORM_EXPORT BlobData {
USING_FAST_MALLOC(BlobData);
WTF_MAKE_NONCOPYABLE(BlobData);
public:
static std::unique_ptr<BlobData> Create();
......@@ -219,6 +218,8 @@ class PLATFORM_EXPORT BlobData {
String content_type_;
FileCompositionStatus file_composition_;
BlobDataItemList items_;
DISALLOW_COPY_AND_ASSIGN(BlobData);
};
class PLATFORM_EXPORT BlobDataHandle
......
......@@ -4,7 +4,7 @@
#ifndef PlatformCredential_h
#define PlatformCredential_h
#include "base/macros.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/text/WTFString.h"
......@@ -12,8 +12,6 @@ namespace blink {
class PLATFORM_EXPORT PlatformCredential
: public GarbageCollectedFinalized<PlatformCredential> {
WTF_MAKE_NONCOPYABLE(PlatformCredential);
public:
static PlatformCredential* Create(const String& id);
virtual ~PlatformCredential();
......@@ -34,6 +32,8 @@ class PLATFORM_EXPORT PlatformCredential
private:
String id_;
String type_;
DISALLOW_COPY_AND_ASSIGN(PlatformCredential);
};
} // namespace blink
......
......@@ -5,6 +5,7 @@
#ifndef PlatformPasswordCredential_h
#define PlatformPasswordCredential_h
#include "base/macros.h"
#include "platform/credentialmanager/PlatformCredential.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
......@@ -14,8 +15,6 @@ namespace blink {
class PLATFORM_EXPORT PlatformPasswordCredential final
: public PlatformCredential {
WTF_MAKE_NONCOPYABLE(PlatformPasswordCredential);
public:
static PlatformPasswordCredential* Create(const String& id,
const String& password,
......@@ -37,6 +36,8 @@ class PLATFORM_EXPORT PlatformPasswordCredential final
String name_;
KURL icon_url_;
String password_;
DISALLOW_COPY_AND_ASSIGN(PlatformPasswordCredential);
};
} // namespace blink
......
......@@ -26,6 +26,7 @@
#ifndef FontFamily_h
#define FontFamily_h
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "platform/PlatformExport.h"
#include "platform/wtf/RefCounted.h"
......@@ -39,7 +40,7 @@ class PLATFORM_EXPORT FontFamily {
DISALLOW_NEW();
public:
FontFamily() {}
FontFamily() = default;
~FontFamily();
void SetFamily(const AtomicString& family) { family_ = family; }
......@@ -63,15 +64,15 @@ class PLATFORM_EXPORT FontFamily {
class PLATFORM_EXPORT SharedFontFamily : public FontFamily,
public RefCounted<SharedFontFamily> {
USING_FAST_MALLOC(SharedFontFamily);
WTF_MAKE_NONCOPYABLE(SharedFontFamily);
public:
static scoped_refptr<SharedFontFamily> Create() {
return base::AdoptRef(new SharedFontFamily);
}
private:
SharedFontFamily() {}
SharedFontFamily() = default;
DISALLOW_COPY_AND_ASSIGN(SharedFontFamily);
};
PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&);
......
......@@ -5,6 +5,7 @@
#ifndef FontSettings_h
#define FontSettings_h
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "platform/PlatformExport.h"
#include "platform/wtf/Allocator.h"
......@@ -38,8 +39,6 @@ class FontTagValuePair {
template <typename T>
class FontSettings {
WTF_MAKE_NONCOPYABLE(FontSettings);
public:
void Append(const T& feature) { list_.push_back(feature); }
size_t size() const { return list_.size(); }
......@@ -63,10 +62,12 @@ class FontSettings {
}
protected:
FontSettings(){};
FontSettings() = default;
private:
Vector<T, 0> list_;
DISALLOW_COPY_AND_ASSIGN(FontSettings);
};
using FontFeature = FontTagValuePair<int>;
......@@ -75,7 +76,7 @@ using FontVariationAxis = FontTagValuePair<float>;
class PLATFORM_EXPORT FontFeatureSettings
: public FontSettings<FontFeature>,
public RefCounted<FontFeatureSettings> {
WTF_MAKE_NONCOPYABLE(FontFeatureSettings);
DISALLOW_COPY_AND_ASSIGN(FontFeatureSettings);
public:
static scoped_refptr<FontFeatureSettings> Create() {
......@@ -89,7 +90,7 @@ class PLATFORM_EXPORT FontFeatureSettings
class PLATFORM_EXPORT FontVariationSettings
: public FontSettings<FontVariationAxis>,
public RefCounted<FontVariationSettings> {
WTF_MAKE_NONCOPYABLE(FontVariationSettings);
DISALLOW_COPY_AND_ASSIGN(FontVariationSettings);
public:
static scoped_refptr<FontVariationSettings> Create() {
......
......@@ -5,6 +5,7 @@
#ifndef GarbageCollected_h
#define GarbageCollected_h
#include "base/macros.h"
#include "platform/heap/ThreadState.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Assertions.h"
......@@ -241,8 +242,6 @@ class GarbageCollected;
// the garbage collector determines that the object is no longer reachable.
template <typename T>
class GarbageCollectedFinalized : public GarbageCollected<T> {
WTF_MAKE_NONCOPYABLE(GarbageCollectedFinalized);
protected:
// finalizeGarbageCollectedObject is called when the object is freed from
// the heap. By default finalization means calling the destructor on the
......@@ -252,13 +251,15 @@ class GarbageCollectedFinalized : public GarbageCollected<T> {
// bit long to make name conflicts less likely.
void FinalizeGarbageCollectedObject() { static_cast<T*>(this)->~T(); }
GarbageCollectedFinalized() {}
~GarbageCollectedFinalized() {}
GarbageCollectedFinalized() = default;
~GarbageCollectedFinalized() = default;
template <typename U>
friend struct HasFinalizer;
template <typename U, bool>
friend struct FinalizerTraitImpl;
DISALLOW_COPY_AND_ASSIGN(GarbageCollectedFinalized);
};
template <typename T,
......
......@@ -32,6 +32,8 @@
#define Heap_h
#include <memory>
#include "base/macros.h"
#include "build/build_config.h"
#include "platform/PlatformExport.h"
#include "platform/heap/GCInfo.h"
......@@ -590,7 +592,6 @@ struct IsEagerlyFinalizedType {
template <typename T>
class GarbageCollected {
IS_GARBAGE_COLLECTED_TYPE();
WTF_MAKE_NONCOPYABLE(GarbageCollected);
// For now direct allocation of arrays on the heap is not allowed.
void* operator new[](size_t size);
......@@ -619,7 +620,9 @@ class GarbageCollected {
void operator delete(void* p) { NOTREACHED(); }
protected:
GarbageCollected() {}
GarbageCollected() = default;
DISALLOW_COPY_AND_ASSIGN(GarbageCollected);
};
// Assigning class types to their arenas.
......
......@@ -5,6 +5,7 @@
#ifndef SafePoint_h
#define SafePoint_h
#include "base/macros.h"
#include "platform/heap/ThreadState.h"
#include "platform/wtf/ThreadingPrimitives.h"
......@@ -12,7 +13,6 @@ namespace blink {
class SafePointScope final {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(SafePointScope);
public:
explicit SafePointScope(BlinkGC::StackState stack_state,
......@@ -30,6 +30,8 @@ class SafePointScope final {
private:
ThreadState* state_;
DISALLOW_COPY_AND_ASSIGN(SafePointScope);
};
} // namespace blink
......
......@@ -32,6 +32,8 @@
#define ThreadState_h
#include <memory>
#include "base/macros.h"
#include "platform/PlatformExport.h"
#include "platform/heap/BlinkGC.h"
#include "platform/heap/ThreadingTraits.h"
......@@ -129,7 +131,6 @@ class PLATFORM_EXPORT BlinkGCObserver {
class PLATFORM_EXPORT ThreadState {
USING_FAST_MALLOC(ThreadState);
WTF_MAKE_NONCOPYABLE(ThreadState);
public:
// See setGCState() for possible state transitions.
......@@ -668,6 +669,8 @@ class PLATFORM_EXPORT ThreadState {
std::unique_ptr<Visitor> visitor;
};
GCData current_gc_data_;
DISALLOW_COPY_AND_ASSIGN(ThreadState);
};
template <>
......
......@@ -5,6 +5,7 @@
#ifndef TracedValue_h
#define TracedValue_h
#include "base/macros.h"
#include "base/trace_event/trace_event_argument.h"
#include "platform/PlatformExport.h"
#include "platform/wtf/text/WTFString.h"
......@@ -14,8 +15,6 @@ namespace blink {
// Thin wrapper around base::trace_event::TracedValue.
class PLATFORM_EXPORT TracedValue final
: public base::trace_event::ConvertableToTraceFormat {
WTF_MAKE_NONCOPYABLE(TracedValue);
public:
~TracedValue();
......@@ -57,6 +56,8 @@ class PLATFORM_EXPORT TracedValue final
base::trace_event::TraceEventMemoryOverhead*) final;
base::trace_event::TracedValue traced_value_;
DISALLOW_COPY_AND_ASSIGN(TracedValue);
};
} // namespace blink
......
......@@ -33,6 +33,8 @@
#include <memory>
#include <utility>
#include "base/macros.h"
#include "platform/PlatformExport.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Assertions.h"
......@@ -78,8 +80,6 @@ class TestingCompositorSupport : public WebCompositorSupport {
// behavior by subclassing TestingPlatformSupport or using
// ScopedTestingPlatformSupport (see below).
class TestingPlatformSupport : public Platform {
WTF_MAKE_NONCOPYABLE(TestingPlatformSupport);
public:
struct Config {
WebCompositorSupport* compositor_support = nullptr;
......@@ -112,6 +112,8 @@ class TestingPlatformSupport : public Platform {
const Config config_;
Platform* const old_platform_;
std::unique_ptr<TestingInterfaceProvider> interface_provider_;
DISALLOW_COPY_AND_ASSIGN(TestingPlatformSupport);
};
// ScopedTestingPlatformSupport<MyTestingPlatformSupport> can be used to
......@@ -138,7 +140,7 @@ class TestingPlatformSupport : public Platform {
// }
template <class T, typename... Args>
class ScopedTestingPlatformSupport final {
WTF_MAKE_NONCOPYABLE(ScopedTestingPlatformSupport);
DISALLOW_COPY_AND_ASSIGN(ScopedTestingPlatformSupport);
public:
explicit ScopedTestingPlatformSupport(Args&&... args) {
......@@ -165,7 +167,7 @@ class ScopedTestingPlatformSupport final {
};
class ScopedUnittestsEnvironmentSetup final {
WTF_MAKE_NONCOPYABLE(ScopedUnittestsEnvironmentSetup);
DISALLOW_COPY_AND_ASSIGN(ScopedUnittestsEnvironmentSetup);
public:
ScopedUnittestsEnvironmentSetup(int argc, char** argv);
......
......@@ -27,6 +27,8 @@
#define PlatformLocale_h
#include <memory>
#include "base/macros.h"
#include "platform/DateComponents.h"
#include "platform/Language.h"
#include "platform/wtf/Allocator.h"
......@@ -36,7 +38,6 @@
namespace blink {
class PLATFORM_EXPORT Locale {
WTF_MAKE_NONCOPYABLE(Locale);
USING_FAST_MALLOC(Locale);
public:
......@@ -185,6 +186,8 @@ class PLATFORM_EXPORT Locale {
String negative_suffix_;
String acceptable_number_characters_;
bool has_locale_data_;
DISALLOW_COPY_AND_ASSIGN(Locale);
};
} // namespace blink
......
......@@ -22,6 +22,7 @@
#ifndef TextBreakIterator_h
#define TextBreakIterator_h
#include "base/macros.h"
#include "platform/PlatformExport.h"
#include "platform/wtf/text/AtomicString.h"
#include "platform/wtf/text/CharacterNames.h"
......@@ -303,7 +304,6 @@ class PLATFORM_EXPORT LazyLineBreakIterator final {
class PLATFORM_EXPORT NonSharedCharacterBreakIterator final {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(NonSharedCharacterBreakIterator);
public:
explicit NonSharedCharacterBreakIterator(const String&);
......@@ -349,6 +349,8 @@ class PLATFORM_EXPORT NonSharedCharacterBreakIterator final {
// For 16 bit strings, we use a TextBreakIterator.
TextBreakIterator* iterator_;
DISALLOW_COPY_AND_ASSIGN(NonSharedCharacterBreakIterator);
};
// Counts the number of grapheme clusters. A surrogate pair or a sequence
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment