Commit 88cc1869 authored by Stuart Langley's avatar Stuart Langley Committed by Commit Bot

Replace WTF_MAKE_NONCOPYABLE with DISALLOW_COPY_AND_ASSIGN in Source/core/loader.

This changes is for files in the path //t_p/WebKit/Source/core/loader/.

Added the include for base/macros.h where needed and moved the macro to the
end of the class as per the code guidelines enforced by lint.

This CL introduces no logic changes.

Bug: 565932
Change-Id: Ia142fe6223698056e1c2d74219ace9865ae4b419
Reviewed-on: https://chromium-review.googlesource.com/805014
Commit-Queue: Stuart Langley <slangley@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521215}
parent 0f585a08
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#ifndef DocumentThreadableLoaderClient_h #ifndef DocumentThreadableLoaderClient_h
#define DocumentThreadableLoaderClient_h #define DocumentThreadableLoaderClient_h
#include "base/macros.h"
#include "core/loader/ThreadableLoaderClient.h" #include "core/loader/ThreadableLoaderClient.h"
namespace blink { namespace blink {
...@@ -39,7 +40,6 @@ class KURL; ...@@ -39,7 +40,6 @@ class KURL;
class ResourceResponse; class ResourceResponse;
class DocumentThreadableLoaderClient : public ThreadableLoaderClient { class DocumentThreadableLoaderClient : public ThreadableLoaderClient {
WTF_MAKE_NONCOPYABLE(DocumentThreadableLoaderClient);
USING_FAST_MALLOC(DocumentThreadableLoaderClient); USING_FAST_MALLOC(DocumentThreadableLoaderClient);
public: public:
...@@ -51,7 +51,9 @@ class DocumentThreadableLoaderClient : public ThreadableLoaderClient { ...@@ -51,7 +51,9 @@ class DocumentThreadableLoaderClient : public ThreadableLoaderClient {
} }
protected: protected:
DocumentThreadableLoaderClient() {} DocumentThreadableLoaderClient() = default;
DISALLOW_COPY_AND_ASSIGN(DocumentThreadableLoaderClient);
}; };
} // namespace blink } // namespace blink
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <memory> #include <memory>
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/frame/ContentSettingsClient.h" #include "core/frame/ContentSettingsClient.h"
#include "core/frame/LocalFrameClient.h" #include "core/frame/LocalFrameClient.h"
...@@ -229,11 +230,9 @@ class CORE_EXPORT EmptyChromeClient : public ChromeClient { ...@@ -229,11 +230,9 @@ class CORE_EXPORT EmptyChromeClient : public ChromeClient {
}; };
class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
WTF_MAKE_NONCOPYABLE(EmptyLocalFrameClient);
public: public:
static EmptyLocalFrameClient* Create() { return new EmptyLocalFrameClient; } static EmptyLocalFrameClient* Create() { return new EmptyLocalFrameClient; }
~EmptyLocalFrameClient() override {} ~EmptyLocalFrameClient() override = default;
bool HasWebView() const override { return true; } // mainly for assertions bool HasWebView() const override { return true; } // mainly for assertions
...@@ -373,14 +372,15 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { ...@@ -373,14 +372,15 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
String GetInstrumentationToken() override { return g_empty_string; }; String GetInstrumentationToken() override { return g_empty_string; };
protected: protected:
EmptyLocalFrameClient() {} EmptyLocalFrameClient() = default;
ContentSettingsClient content_settings_client_; ContentSettingsClient content_settings_client_;
service_manager::InterfaceProvider interface_provider_; service_manager::InterfaceProvider interface_provider_;
DISALLOW_COPY_AND_ASSIGN(EmptyLocalFrameClient);
}; };
class EmptySpellCheckPanelHostClient : public WebSpellCheckPanelHostClient { class EmptySpellCheckPanelHostClient : public WebSpellCheckPanelHostClient {
WTF_MAKE_NONCOPYABLE(EmptySpellCheckPanelHostClient);
USING_FAST_MALLOC(EmptySpellCheckPanelHostClient); USING_FAST_MALLOC(EmptySpellCheckPanelHostClient);
public: public:
...@@ -389,10 +389,11 @@ class EmptySpellCheckPanelHostClient : public WebSpellCheckPanelHostClient { ...@@ -389,10 +389,11 @@ class EmptySpellCheckPanelHostClient : public WebSpellCheckPanelHostClient {
void ShowSpellingUI(bool) override {} void ShowSpellingUI(bool) override {}
bool IsShowingSpellingUI() override { return false; } bool IsShowingSpellingUI() override { return false; }
void UpdateSpellingUIWithMisspelledWord(const WebString&) override {} void UpdateSpellingUIWithMisspelledWord(const WebString&) override {}
DISALLOW_COPY_AND_ASSIGN(EmptySpellCheckPanelHostClient);
}; };
class EmptyEditorClient final : public EditorClient { class EmptyEditorClient final : public EditorClient {
WTF_MAKE_NONCOPYABLE(EmptyEditorClient);
USING_FAST_MALLOC(EmptyEditorClient); USING_FAST_MALLOC(EmptyEditorClient);
public: public:
...@@ -410,10 +411,11 @@ class EmptyEditorClient final : public EditorClient { ...@@ -410,10 +411,11 @@ class EmptyEditorClient final : public EditorClient {
} }
bool HandleKeyboardEvent(LocalFrame*) override { return false; } bool HandleKeyboardEvent(LocalFrame*) override { return false; }
DISALLOW_COPY_AND_ASSIGN(EmptyEditorClient);
}; };
class EmptyContextMenuClient final : public ContextMenuClient { class EmptyContextMenuClient final : public ContextMenuClient {
WTF_MAKE_NONCOPYABLE(EmptyContextMenuClient);
USING_FAST_MALLOC(EmptyContextMenuClient); USING_FAST_MALLOC(EmptyContextMenuClient);
public: public:
...@@ -421,11 +423,11 @@ class EmptyContextMenuClient final : public ContextMenuClient { ...@@ -421,11 +423,11 @@ class EmptyContextMenuClient final : public ContextMenuClient {
~EmptyContextMenuClient() override {} ~EmptyContextMenuClient() override {}
bool ShowContextMenu(const ContextMenu*, WebMenuSourceType) override; bool ShowContextMenu(const ContextMenu*, WebMenuSourceType) override;
void ClearContextMenu() override {} void ClearContextMenu() override {}
DISALLOW_COPY_AND_ASSIGN(EmptyContextMenuClient);
}; };
class CORE_EXPORT EmptyRemoteFrameClient : public RemoteFrameClient { class CORE_EXPORT EmptyRemoteFrameClient : public RemoteFrameClient {
WTF_MAKE_NONCOPYABLE(EmptyRemoteFrameClient);
public: public:
EmptyRemoteFrameClient(); EmptyRemoteFrameClient();
...@@ -457,6 +459,8 @@ class CORE_EXPORT EmptyRemoteFrameClient : public RemoteFrameClient { ...@@ -457,6 +459,8 @@ class CORE_EXPORT EmptyRemoteFrameClient : public RemoteFrameClient {
Frame* NextSibling() const override { return nullptr; } Frame* NextSibling() const override { return nullptr; }
Frame* FirstChild() const override { return nullptr; } Frame* FirstChild() const override { return nullptr; }
void FrameFocused() const override {} void FrameFocused() const override {}
DISALLOW_COPY_AND_ASSIGN(EmptyRemoteFrameClient);
}; };
CORE_EXPORT void FillWithEmptyClients(Page::PageClients&); CORE_EXPORT void FillWithEmptyClients(Page::PageClients&);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#ifndef FormSubmission_h #ifndef FormSubmission_h
#define FormSubmission_h #define FormSubmission_h
#include "base/macros.h"
#include "core/loader/FrameLoadRequest.h" #include "core/loader/FrameLoadRequest.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h" #include "platform/weborigin/KURL.h"
...@@ -51,7 +52,6 @@ class FormSubmission : public GarbageCollectedFinalized<FormSubmission> { ...@@ -51,7 +52,6 @@ class FormSubmission : public GarbageCollectedFinalized<FormSubmission> {
class Attributes { class Attributes {
DISALLOW_NEW(); DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(Attributes);
public: public:
Attributes() Attributes()
...@@ -88,6 +88,8 @@ class FormSubmission : public GarbageCollectedFinalized<FormSubmission> { ...@@ -88,6 +88,8 @@ class FormSubmission : public GarbageCollectedFinalized<FormSubmission> {
AtomicString target_; AtomicString target_;
AtomicString encoding_type_; AtomicString encoding_type_;
String accept_charset_; String accept_charset_;
DISALLOW_COPY_AND_ASSIGN(Attributes);
}; };
static FormSubmission* Create(HTMLFormElement*, static FormSubmission* Create(HTMLFormElement*,
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#ifndef FrameLoader_h #ifndef FrameLoader_h
#define FrameLoader_h #define FrameLoader_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/dom/IconURL.h" #include "core/dom/IconURL.h"
#include "core/dom/SandboxFlags.h" #include "core/dom/SandboxFlags.h"
...@@ -71,7 +72,6 @@ CORE_EXPORT bool IsBackForwardLoadType(FrameLoadType); ...@@ -71,7 +72,6 @@ CORE_EXPORT bool IsBackForwardLoadType(FrameLoadType);
CORE_EXPORT bool IsReloadLoadType(FrameLoadType); CORE_EXPORT bool IsReloadLoadType(FrameLoadType);
class CORE_EXPORT FrameLoader final { class CORE_EXPORT FrameLoader final {
WTF_MAKE_NONCOPYABLE(FrameLoader);
DISALLOW_NEW(); DISALLOW_NEW();
public: public:
...@@ -299,6 +299,8 @@ class CORE_EXPORT FrameLoader final { ...@@ -299,6 +299,8 @@ class CORE_EXPORT FrameLoader final {
bool dispatching_did_clear_window_object_in_main_world_; bool dispatching_did_clear_window_object_in_main_world_;
bool protect_provisional_loader_; bool protect_provisional_loader_;
bool detached_; bool detached_;
DISALLOW_COPY_AND_ASSIGN(FrameLoader);
}; };
} // namespace blink } // namespace blink
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#ifndef FrameLoaderStateMachine_h #ifndef FrameLoaderStateMachine_h
#define FrameLoaderStateMachine_h #define FrameLoaderStateMachine_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/wtf/Allocator.h" #include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
#include "platform/wtf/text/WTFString.h" #include "platform/wtf/text/WTFString.h"
namespace blink { namespace blink {
...@@ -42,7 +42,6 @@ namespace blink { ...@@ -42,7 +42,6 @@ namespace blink {
// is executing. // is executing.
class CORE_EXPORT FrameLoaderStateMachine { class CORE_EXPORT FrameLoaderStateMachine {
DISALLOW_NEW(); DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(FrameLoaderStateMachine);
public: public:
FrameLoaderStateMachine(); FrameLoaderStateMachine();
...@@ -67,6 +66,8 @@ class CORE_EXPORT FrameLoaderStateMachine { ...@@ -67,6 +66,8 @@ class CORE_EXPORT FrameLoaderStateMachine {
private: private:
State state_; State state_;
DISALLOW_COPY_AND_ASSIGN(FrameLoaderStateMachine);
}; };
} // namespace blink } // namespace blink
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
#ifndef IdlenessDetector_h #ifndef IdlenessDetector_h
#define IdlenessDetector_h #define IdlenessDetector_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/Timer.h" #include "platform/Timer.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/scheduler/base/task_time_observer.h" #include "platform/scheduler/base/task_time_observer.h"
#include "platform/wtf/Noncopyable.h"
namespace blink { namespace blink {
...@@ -24,8 +24,6 @@ class ResourceFetcher; ...@@ -24,8 +24,6 @@ class ResourceFetcher;
class CORE_EXPORT IdlenessDetector class CORE_EXPORT IdlenessDetector
: public GarbageCollectedFinalized<IdlenessDetector>, : public GarbageCollectedFinalized<IdlenessDetector>,
public scheduler::TaskTimeObserver { public scheduler::TaskTimeObserver {
WTF_MAKE_NONCOPYABLE(IdlenessDetector);
public: public:
explicit IdlenessDetector(LocalFrame*); explicit IdlenessDetector(LocalFrame*);
...@@ -67,6 +65,8 @@ class CORE_EXPORT IdlenessDetector ...@@ -67,6 +65,8 @@ class CORE_EXPORT IdlenessDetector
double network_0_quiet_start_time_ = 0; double network_0_quiet_start_time_ = 0;
double network_2_quiet_start_time_ = 0; double network_2_quiet_start_time_ = 0;
TaskRunnerTimer<IdlenessDetector> network_quiet_timer_; TaskRunnerTimer<IdlenessDetector> network_quiet_timer_;
DISALLOW_COPY_AND_ASSIGN(IdlenessDetector);
}; };
} // namespace blink } // namespace blink
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef InteractiveDetector_h #ifndef InteractiveDetector_h
#define InteractiveDetector_h #define InteractiveDetector_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/LongTaskDetector.h" #include "platform/LongTaskDetector.h"
#include "platform/PODInterval.h" #include "platform/PODInterval.h"
#include "platform/Supplementable.h" #include "platform/Supplementable.h"
#include "platform/Timer.h" #include "platform/Timer.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/wtf/Noncopyable.h"
#include "platform/wtf/Optional.h" #include "platform/wtf/Optional.h"
namespace blink { namespace blink {
...@@ -27,15 +27,12 @@ class CORE_EXPORT InteractiveDetector ...@@ -27,15 +27,12 @@ class CORE_EXPORT InteractiveDetector
: public GarbageCollectedFinalized<InteractiveDetector>, : public GarbageCollectedFinalized<InteractiveDetector>,
public Supplement<Document>, public Supplement<Document>,
public LongTaskObserver { public LongTaskObserver {
WTF_MAKE_NONCOPYABLE(InteractiveDetector);
USING_GARBAGE_COLLECTED_MIXIN(InteractiveDetector); USING_GARBAGE_COLLECTED_MIXIN(InteractiveDetector);
public: public:
// This class can be easily switched out to allow better testing of // This class can be easily switched out to allow better testing of
// InteractiveDetector. // InteractiveDetector.
class CORE_EXPORT NetworkActivityChecker { class CORE_EXPORT NetworkActivityChecker {
WTF_MAKE_NONCOPYABLE(NetworkActivityChecker);
public: public:
NetworkActivityChecker(Document* document) : document_(document) {} NetworkActivityChecker(Document* document) : document_(document) {}
...@@ -44,6 +41,8 @@ class CORE_EXPORT InteractiveDetector ...@@ -44,6 +41,8 @@ class CORE_EXPORT InteractiveDetector
private: private:
WeakPersistent<Document> document_; WeakPersistent<Document> document_;
DISALLOW_COPY_AND_ASSIGN(NetworkActivityChecker);
}; };
static InteractiveDetector* From(Document&); static InteractiveDetector* From(Document&);
...@@ -139,6 +138,8 @@ class CORE_EXPORT InteractiveDetector ...@@ -139,6 +138,8 @@ class CORE_EXPORT InteractiveDetector
// LongTaskObserver implementation // LongTaskObserver implementation
void OnLongTaskDetected(double start_time, double end_time) override; void OnLongTaskDetected(double start_time, double end_time) override;
DISALLOW_COPY_AND_ASSIGN(InteractiveDetector);
}; };
} // namespace blink } // namespace blink
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define MixedContentChecker_h #define MixedContentChecker_h
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/loader/fetch/ResourceRequest.h" #include "platform/loader/fetch/ResourceRequest.h"
...@@ -61,7 +62,6 @@ class WebWorkerFetchContext; ...@@ -61,7 +62,6 @@ class WebWorkerFetchContext;
// Current mixed content W3C draft that drives this implementation: // Current mixed content W3C draft that drives this implementation:
// https://w3c.github.io/webappsec-mixed-content/ // https://w3c.github.io/webappsec-mixed-content/
class CORE_EXPORT MixedContentChecker final { class CORE_EXPORT MixedContentChecker final {
WTF_MAKE_NONCOPYABLE(MixedContentChecker);
DISALLOW_NEW(); DISALLOW_NEW();
public: public:
...@@ -138,6 +138,8 @@ class CORE_EXPORT MixedContentChecker final { ...@@ -138,6 +138,8 @@ class CORE_EXPORT MixedContentChecker final {
const KURL&, const KURL&,
bool allowed); bool allowed);
static void Count(Frame*, WebURLRequest::RequestContext, const LocalFrame*); static void Count(Frame*, WebURLRequest::RequestContext, const LocalFrame*);
DISALLOW_COPY_AND_ASSIGN(MixedContentChecker);
}; };
} // namespace blink } // namespace blink
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#define NavigationScheduler_h #define NavigationScheduler_h
#include <memory> #include <memory>
#include "base/macros.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
...@@ -41,7 +43,6 @@ ...@@ -41,7 +43,6 @@
#include "platform/weborigin/KURL.h" #include "platform/weborigin/KURL.h"
#include "platform/wtf/Forward.h" #include "platform/wtf/Forward.h"
#include "platform/wtf/HashMap.h" #include "platform/wtf/HashMap.h"
#include "platform/wtf/Noncopyable.h"
#include "platform/wtf/text/WTFString.h" #include "platform/wtf/text/WTFString.h"
#include "public/platform/scheduler/renderer/renderer_scheduler.h" #include "public/platform/scheduler/renderer/renderer_scheduler.h"
...@@ -53,8 +54,6 @@ class ScheduledNavigation; ...@@ -53,8 +54,6 @@ class ScheduledNavigation;
class CORE_EXPORT NavigationScheduler final class CORE_EXPORT NavigationScheduler final
: public GarbageCollectedFinalized<NavigationScheduler> { : public GarbageCollectedFinalized<NavigationScheduler> {
WTF_MAKE_NONCOPYABLE(NavigationScheduler);
public: public:
static NavigationScheduler* Create(LocalFrame* frame) { static NavigationScheduler* Create(LocalFrame* frame) {
return new NavigationScheduler(frame); return new NavigationScheduler(frame);
...@@ -95,10 +94,12 @@ class CORE_EXPORT NavigationScheduler final ...@@ -95,10 +94,12 @@ class CORE_EXPORT NavigationScheduler final
// Exists because we can't deref m_frame in destructor. // Exists because we can't deref m_frame in destructor.
scheduler::RendererScheduler::NavigatingFrameType frame_type_; scheduler::RendererScheduler::NavigatingFrameType frame_type_;
DISALLOW_COPY_AND_ASSIGN(NavigationScheduler);
}; };
class NavigationDisablerForBeforeUnload { class NavigationDisablerForBeforeUnload {
WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload); DISALLOW_COPY_AND_ASSIGN(NavigationDisablerForBeforeUnload);
STACK_ALLOCATED(); STACK_ALLOCATED();
public: public:
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
#define PingLoader_h #define PingLoader_h
#include <memory> #include <memory>
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/Timer.h" #include "platform/Timer.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/heap/SelfKeepAlive.h" #include "platform/heap/SelfKeepAlive.h"
#include "platform/wtf/Forward.h" #include "platform/wtf/Forward.h"
#include "platform/wtf/Noncopyable.h"
#include "public/platform/WebURLLoaderClient.h" #include "public/platform/WebURLLoaderClient.h"
namespace blink { namespace blink {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#ifndef PrerendererClient_h #ifndef PrerendererClient_h
#define PrerendererClient_h #define PrerendererClient_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/page/Page.h" #include "core/page/Page.h"
#include "platform/Supplementable.h" #include "platform/Supplementable.h"
...@@ -46,7 +47,6 @@ class CORE_EXPORT PrerendererClient ...@@ -46,7 +47,6 @@ class CORE_EXPORT PrerendererClient
: public GarbageCollected<PrerendererClient>, : public GarbageCollected<PrerendererClient>,
public Supplement<Page> { public Supplement<Page> {
USING_GARBAGE_COLLECTED_MIXIN(PrerendererClient); USING_GARBAGE_COLLECTED_MIXIN(PrerendererClient);
WTF_MAKE_NONCOPYABLE(PrerendererClient);
public: public:
PrerendererClient(Page&, WebPrerendererClient*); PrerendererClient(Page&, WebPrerendererClient*);
...@@ -59,6 +59,8 @@ class CORE_EXPORT PrerendererClient ...@@ -59,6 +59,8 @@ class CORE_EXPORT PrerendererClient
private: private:
WebPrerendererClient* client_; WebPrerendererClient* client_;
DISALLOW_COPY_AND_ASSIGN(PrerendererClient);
}; };
CORE_EXPORT void ProvidePrerendererClientTo(Page&, PrerendererClient*); CORE_EXPORT void ProvidePrerendererClientTo(Page&, PrerendererClient*);
......
...@@ -54,7 +54,6 @@ static const double kProgressNotificationInterval = 0.02; ...@@ -54,7 +54,6 @@ static const double kProgressNotificationInterval = 0.02;
static const double kProgressNotificationTimeInterval = 0.1; static const double kProgressNotificationTimeInterval = 0.1;
struct ProgressItem { struct ProgressItem {
WTF_MAKE_NONCOPYABLE(ProgressItem);
USING_FAST_MALLOC(ProgressItem); USING_FAST_MALLOC(ProgressItem);
public: public:
...@@ -63,6 +62,8 @@ struct ProgressItem { ...@@ -63,6 +62,8 @@ struct ProgressItem {
long long bytes_received; long long bytes_received;
long long estimated_length; long long estimated_length;
DISALLOW_COPY_AND_ASSIGN(ProgressItem);
}; };
ProgressTracker* ProgressTracker::Create(LocalFrame* frame) { ProgressTracker* ProgressTracker::Create(LocalFrame* frame) {
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#define ProgressTracker_h #define ProgressTracker_h
#include <memory> #include <memory>
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/loader/FrameLoaderTypes.h" #include "core/loader/FrameLoaderTypes.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
...@@ -34,7 +36,6 @@ ...@@ -34,7 +36,6 @@
#include "platform/wtf/Allocator.h" #include "platform/wtf/Allocator.h"
#include "platform/wtf/Forward.h" #include "platform/wtf/Forward.h"
#include "platform/wtf/HashMap.h" #include "platform/wtf/HashMap.h"
#include "platform/wtf/Noncopyable.h"
namespace blink { namespace blink {
...@@ -48,8 +49,6 @@ struct ProgressItem; ...@@ -48,8 +49,6 @@ struct ProgressItem;
// We should find a better way for Android to get this data and remove this! // We should find a better way for Android to get this data and remove this!
class CORE_EXPORT ProgressTracker final class CORE_EXPORT ProgressTracker final
: public GarbageCollectedFinalized<ProgressTracker> { : public GarbageCollectedFinalized<ProgressTracker> {
WTF_MAKE_NONCOPYABLE(ProgressTracker);
public: public:
static ProgressTracker* Create(LocalFrame*); static ProgressTracker* Create(LocalFrame*);
...@@ -89,6 +88,8 @@ class CORE_EXPORT ProgressTracker final ...@@ -89,6 +88,8 @@ class CORE_EXPORT ProgressTracker final
double progress_value_; double progress_value_;
HashMap<unsigned long, std::unique_ptr<ProgressItem>> progress_items_; HashMap<unsigned long, std::unique_ptr<ProgressItem>> progress_items_;
DISALLOW_COPY_AND_ASSIGN(ProgressTracker);
}; };
} // namespace blink } // namespace blink
......
...@@ -32,12 +32,13 @@ ...@@ -32,12 +32,13 @@
#define ThreadableLoader_h #define ThreadableLoader_h
#include <memory> #include <memory>
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/CrossThreadCopier.h" #include "platform/CrossThreadCopier.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/loader/fetch/ResourceLoaderOptions.h" #include "platform/loader/fetch/ResourceLoaderOptions.h"
#include "platform/wtf/Allocator.h" #include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
namespace blink { namespace blink {
...@@ -92,8 +93,6 @@ struct CrossThreadCopier<ThreadableLoaderOptions> { ...@@ -92,8 +93,6 @@ struct CrossThreadCopier<ThreadableLoaderOptions> {
// redirect happens. // redirect happens.
class CORE_EXPORT ThreadableLoader class CORE_EXPORT ThreadableLoader
: public GarbageCollectedFinalized<ThreadableLoader> { : public GarbageCollectedFinalized<ThreadableLoader> {
WTF_MAKE_NONCOPYABLE(ThreadableLoader);
public: public:
static void LoadResourceSynchronously(ExecutionContext&, static void LoadResourceSynchronously(ExecutionContext&,
const ResourceRequest&, const ResourceRequest&,
...@@ -157,12 +156,14 @@ class CORE_EXPORT ThreadableLoader ...@@ -157,12 +156,14 @@ class CORE_EXPORT ThreadableLoader
// will be processed. // will be processed.
virtual void Detach() = 0; virtual void Detach() = 0;
virtual ~ThreadableLoader() {} virtual ~ThreadableLoader() = default;
virtual void Trace(blink::Visitor* visitor) {} virtual void Trace(blink::Visitor* visitor) {}
protected: protected:
ThreadableLoader() {} ThreadableLoader() = default;
DISALLOW_COPY_AND_ASSIGN(ThreadableLoader);
}; };
} // namespace blink } // namespace blink
......
...@@ -32,9 +32,10 @@ ...@@ -32,9 +32,10 @@
#define ThreadableLoaderClient_h #define ThreadableLoaderClient_h
#include <memory> #include <memory>
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/wtf/Noncopyable.h"
#include "public/platform/WebDataConsumerHandle.h" #include "public/platform/WebDataConsumerHandle.h"
namespace blink { namespace blink {
...@@ -45,8 +46,6 @@ class ResourceResponse; ...@@ -45,8 +46,6 @@ class ResourceResponse;
class ResourceTimingInfo; class ResourceTimingInfo;
class CORE_EXPORT ThreadableLoaderClient { class CORE_EXPORT ThreadableLoaderClient {
WTF_MAKE_NONCOPYABLE(ThreadableLoaderClient);
public: public:
virtual void DidSendData(unsigned long long /*bytesSent*/, virtual void DidSendData(unsigned long long /*bytesSent*/,
unsigned long long /*totalBytesToBeSent*/) {} unsigned long long /*totalBytesToBeSent*/) {}
...@@ -69,7 +68,9 @@ class CORE_EXPORT ThreadableLoaderClient { ...@@ -69,7 +68,9 @@ class CORE_EXPORT ThreadableLoaderClient {
virtual ~ThreadableLoaderClient() {} virtual ~ThreadableLoaderClient() {}
protected: protected:
ThreadableLoaderClient() {} ThreadableLoaderClient() = default;
DISALLOW_COPY_AND_ASSIGN(ThreadableLoaderClient);
}; };
} // namespace blink } // namespace blink
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
#ifndef ThreadableLoadingContext_h #ifndef ThreadableLoadingContext_h
#define ThreadableLoadingContext_h #define ThreadableLoadingContext_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/heap/Heap.h" #include "platform/heap/Heap.h"
#include "platform/wtf/Forward.h" #include "platform/wtf/Forward.h"
#include "platform/wtf/Noncopyable.h"
namespace blink { namespace blink {
...@@ -23,8 +23,6 @@ class WorkerGlobalScope; ...@@ -23,8 +23,6 @@ class WorkerGlobalScope;
// context is bound to (e.g. on the main thread). // context is bound to (e.g. on the main thread).
class CORE_EXPORT ThreadableLoadingContext class CORE_EXPORT ThreadableLoadingContext
: public GarbageCollected<ThreadableLoadingContext> { : public GarbageCollected<ThreadableLoadingContext> {
WTF_MAKE_NONCOPYABLE(ThreadableLoadingContext);
public: public:
static ThreadableLoadingContext* Create(Document&); static ThreadableLoadingContext* Create(Document&);
static ThreadableLoadingContext* Create(WorkerGlobalScope&); static ThreadableLoadingContext* Create(WorkerGlobalScope&);
...@@ -37,6 +35,8 @@ class CORE_EXPORT ThreadableLoadingContext ...@@ -37,6 +35,8 @@ class CORE_EXPORT ThreadableLoadingContext
BaseFetchContext* GetFetchContext(); BaseFetchContext* GetFetchContext();
virtual void Trace(blink::Visitor* visitor) {} virtual void Trace(blink::Visitor* visitor) {}
DISALLOW_COPY_AND_ASSIGN(ThreadableLoadingContext);
}; };
} // namespace blink } // namespace blink
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef ModuleScriptLoader_h #ifndef ModuleScriptLoader_h
#define ModuleScriptLoader_h #define ModuleScriptLoader_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/loader/modulescript/ModuleScriptCreationParams.h" #include "core/loader/modulescript/ModuleScriptCreationParams.h"
#include "core/loader/modulescript/ModuleScriptFetchRequest.h" #include "core/loader/modulescript/ModuleScriptFetchRequest.h"
...@@ -32,7 +33,6 @@ class CORE_EXPORT ModuleScriptLoader final ...@@ -32,7 +33,6 @@ class CORE_EXPORT ModuleScriptLoader final
: public GarbageCollectedFinalized<ModuleScriptLoader>, : public GarbageCollectedFinalized<ModuleScriptLoader>,
public ModuleScriptFetcher::Client { public ModuleScriptFetcher::Client {
USING_GARBAGE_COLLECTED_MIXIN(ModuleScriptLoader); USING_GARBAGE_COLLECTED_MIXIN(ModuleScriptLoader);
WTF_MAKE_NONCOPYABLE(ModuleScriptLoader);
enum class State { enum class State {
kInitial, kInitial,
...@@ -87,6 +87,8 @@ class CORE_EXPORT ModuleScriptLoader final ...@@ -87,6 +87,8 @@ class CORE_EXPORT ModuleScriptLoader final
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
KURL url_; KURL url_;
#endif #endif
DISALLOW_COPY_AND_ASSIGN(ModuleScriptLoader);
}; };
} // namespace blink } // namespace blink
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
#ifndef PrerenderHandle_h #ifndef PrerenderHandle_h
#define PrerenderHandle_h #define PrerenderHandle_h
#include "base/macros.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "core/dom/ContextLifecycleObserver.h" #include "core/dom/ContextLifecycleObserver.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h" #include "platform/weborigin/KURL.h"
#include "platform/wtf/Noncopyable.h"
namespace blink { namespace blink {
...@@ -46,7 +46,6 @@ class PrerenderClient; ...@@ -46,7 +46,6 @@ class PrerenderClient;
class PrerenderHandle final : public GarbageCollectedFinalized<PrerenderHandle>, class PrerenderHandle final : public GarbageCollectedFinalized<PrerenderHandle>,
public ContextLifecycleObserver { public ContextLifecycleObserver {
USING_GARBAGE_COLLECTED_MIXIN(PrerenderHandle); USING_GARBAGE_COLLECTED_MIXIN(PrerenderHandle);
WTF_MAKE_NONCOPYABLE(PrerenderHandle);
public: public:
static PrerenderHandle* Create(Document&, static PrerenderHandle* Create(Document&,
...@@ -71,6 +70,8 @@ class PrerenderHandle final : public GarbageCollectedFinalized<PrerenderHandle>, ...@@ -71,6 +70,8 @@ class PrerenderHandle final : public GarbageCollectedFinalized<PrerenderHandle>,
void Detach(); void Detach();
Member<Prerender> prerender_; Member<Prerender> prerender_;
DISALLOW_COPY_AND_ASSIGN(PrerenderHandle);
}; };
} // namespace blink } // namespace blink
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#ifndef MultipartImageResourceParser_h #ifndef MultipartImageResourceParser_h
#define MultipartImageResourceParser_h #define MultipartImageResourceParser_h
#include "base/macros.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/loader/fetch/ResourceResponse.h" #include "platform/loader/fetch/ResourceResponse.h"
...@@ -51,8 +52,6 @@ namespace blink { ...@@ -51,8 +52,6 @@ namespace blink {
// A parser parsing mlutipart/x-mixed-replace resource. // A parser parsing mlutipart/x-mixed-replace resource.
class CORE_EXPORT MultipartImageResourceParser final class CORE_EXPORT MultipartImageResourceParser final
: public GarbageCollectedFinalized<MultipartImageResourceParser> { : public GarbageCollectedFinalized<MultipartImageResourceParser> {
WTF_MAKE_NONCOPYABLE(MultipartImageResourceParser);
public: public:
class CORE_EXPORT Client : public GarbageCollectedMixin { class CORE_EXPORT Client : public GarbageCollectedMixin {
public: public:
...@@ -95,6 +94,8 @@ class CORE_EXPORT MultipartImageResourceParser final ...@@ -95,6 +94,8 @@ class CORE_EXPORT MultipartImageResourceParser final
bool is_parsing_headers_ = false; bool is_parsing_headers_ = false;
bool saw_last_boundary_ = false; bool saw_last_boundary_ = false;
bool is_cancelled_ = false; bool is_cancelled_ = false;
DISALLOW_COPY_AND_ASSIGN(MultipartImageResourceParser);
}; };
} // namespace blink } // namespace blink
......
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