Commit dd3e9b01 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Replace DISALLOW_COPY_AND_ASSIGN macros in printing/.

Remove deprecated macro usage and use explicit deletions instead. Also
remove some unnecessary includes for base/macros.h.

Bug: 1010217
Change-Id: I8d1e4d03e93933262f184b7802de4ef1b94ab1e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363630Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799850}
parent 3ed7a262
...@@ -33,6 +33,8 @@ constexpr int kCompletedJobsLimit = 3; ...@@ -33,6 +33,8 @@ constexpr int kCompletedJobsLimit = 3;
class DestinationEnumerator { class DestinationEnumerator {
public: public:
DestinationEnumerator() {} DestinationEnumerator() {}
DestinationEnumerator(const DestinationEnumerator&) = delete;
DestinationEnumerator& operator=(const DestinationEnumerator&) = delete;
static int cups_callback(void* user_data, unsigned flags, cups_dest_t* dest) { static int cups_callback(void* user_data, unsigned flags, cups_dest_t* dest) {
cups_dest_t* copied_dest; cups_dest_t* copied_dest;
...@@ -51,8 +53,6 @@ class DestinationEnumerator { ...@@ -51,8 +53,6 @@ class DestinationEnumerator {
private: private:
std::vector<ScopedDestination> dests_; std::vector<ScopedDestination> dests_;
DISALLOW_COPY_AND_ASSIGN(DestinationEnumerator);
}; };
} // namespace } // namespace
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "printing/backend/cups_deleters.h" #include "printing/backend/cups_deleters.h"
#include "printing/backend/cups_jobs.h" #include "printing/backend/cups_jobs.h"
...@@ -38,9 +37,9 @@ class PRINTING_EXPORT CupsConnection { ...@@ -38,9 +37,9 @@ class PRINTING_EXPORT CupsConnection {
CupsConnection(const GURL& print_server_url, CupsConnection(const GURL& print_server_url,
http_encryption_t encryption, http_encryption_t encryption,
bool blocking); bool blocking);
CupsConnection(CupsConnection&& connection); CupsConnection(CupsConnection&& connection);
CupsConnection(const CupsConnection&) = delete;
CupsConnection& operator=(const CupsConnection&) = delete;
~CupsConnection(); ~CupsConnection();
// Returns a vector of all the printers configure on the CUPS server. // Returns a vector of all the printers configure on the CUPS server.
...@@ -74,8 +73,6 @@ class PRINTING_EXPORT CupsConnection { ...@@ -74,8 +73,6 @@ class PRINTING_EXPORT CupsConnection {
bool blocking_; bool blocking_;
ScopedHttpPtr cups_http_; ScopedHttpPtr cups_http_;
DISALLOW_COPY_AND_ASSIGN(CupsConnection);
}; };
} // namespace printing } // namespace printing
......
...@@ -62,9 +62,9 @@ class PRINTING_EXPORT CupsPrinter : public CupsOptionProvider { ...@@ -62,9 +62,9 @@ class PRINTING_EXPORT CupsPrinter : public CupsOptionProvider {
// Create a printer with a connection defined by |http| and |dest|. // Create a printer with a connection defined by |http| and |dest|.
CupsPrinter(http_t* http, ScopedDestination dest); CupsPrinter(http_t* http, ScopedDestination dest);
CupsPrinter(CupsPrinter&& printer); CupsPrinter(CupsPrinter&& printer);
CupsPrinter(const CupsPrinter&) = delete;
CupsPrinter& operator=(const CupsPrinter&) = delete;
~CupsPrinter() override; ~CupsPrinter() override;
// Returns true if this is the default printer // Returns true if this is the default printer
...@@ -153,8 +153,6 @@ class PRINTING_EXPORT CupsPrinter : public CupsOptionProvider { ...@@ -153,8 +153,6 @@ class PRINTING_EXPORT CupsPrinter : public CupsOptionProvider {
// opaque object containing printer attributes and options // opaque object containing printer attributes and options
mutable ScopedDestInfo dest_info_; mutable ScopedDestInfo dest_info_;
DISALLOW_COPY_AND_ASSIGN(CupsPrinter);
}; };
} // namespace printing } // namespace printing
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "printing/backend/print_backend.h" #include "printing/backend/print_backend.h"
#include "base/macros.h"
#include "base/values.h" #include "base/values.h"
namespace printing { namespace printing {
...@@ -17,6 +16,8 @@ class DummyPrintBackend : public PrintBackend { ...@@ -17,6 +16,8 @@ class DummyPrintBackend : public PrintBackend {
public: public:
explicit DummyPrintBackend(const std::string& locale) explicit DummyPrintBackend(const std::string& locale)
: PrintBackend(locale) {} : PrintBackend(locale) {}
DummyPrintBackend(const DummyPrintBackend&) = delete;
DummyPrintBackend& operator=(const DummyPrintBackend&) = delete;
bool EnumeratePrinters(PrinterList* printer_list) override { return false; } bool EnumeratePrinters(PrinterList* printer_list) override { return false; }
...@@ -49,8 +50,6 @@ class DummyPrintBackend : public PrintBackend { ...@@ -49,8 +50,6 @@ class DummyPrintBackend : public PrintBackend {
private: private:
~DummyPrintBackend() override = default; ~DummyPrintBackend() override = default;
DISALLOW_COPY_AND_ASSIGN(DummyPrintBackend);
}; };
// static // static
......
...@@ -117,14 +117,14 @@ class PRINTING_EXPORT XPSModule { ...@@ -117,14 +117,14 @@ class PRINTING_EXPORT XPSModule {
class PRINTING_EXPORT ScopedXPSInitializer { class PRINTING_EXPORT ScopedXPSInitializer {
public: public:
ScopedXPSInitializer(); ScopedXPSInitializer();
ScopedXPSInitializer(const ScopedXPSInitializer&) = delete;
ScopedXPSInitializer& operator=(const ScopedXPSInitializer&) = delete;
~ScopedXPSInitializer(); ~ScopedXPSInitializer();
bool initialized() const { return initialized_; } bool initialized() const { return initialized_; }
private: private:
bool initialized_; bool initialized_;
DISALLOW_COPY_AND_ASSIGN(ScopedXPSInitializer);
}; };
// Wrapper class to wrap the XPS Print APIs (these are different from the PTxxx // Wrapper class to wrap the XPS Print APIs (these are different from the PTxxx
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "base/check_op.h" #include "base/check_op.h"
#include "base/files/file.h" #include "base/files/file.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h"
#include "base/notreached.h" #include "base/notreached.h"
#include "base/numerics/safe_conversions.h" #include "base/numerics/safe_conversions.h"
#include "skia/ext/skia_utils_win.h" #include "skia/ext/skia_utils_win.h"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "printing/metafile.h" #include "printing/metafile.h"
namespace base { namespace base {
...@@ -38,6 +37,8 @@ class PRINTING_EXPORT Emf : public Metafile { ...@@ -38,6 +37,8 @@ class PRINTING_EXPORT Emf : public Metafile {
// Generates a virtual HDC that will record every GDI commands and compile // Generates a virtual HDC that will record every GDI commands and compile
// it in a EMF data stream. // it in a EMF data stream.
Emf(); Emf();
Emf(const Emf&) = delete;
Emf& operator=(const Emf&) = delete;
~Emf() override; ~Emf() override;
// Closes metafile. // Closes metafile.
...@@ -95,8 +96,6 @@ class PRINTING_EXPORT Emf : public Metafile { ...@@ -95,8 +96,6 @@ class PRINTING_EXPORT Emf : public Metafile {
// Valid when generating EMF data through a virtual HDC. // Valid when generating EMF data through a virtual HDC.
HDC hdc_; HDC hdc_;
DISALLOW_COPY_AND_ASSIGN(Emf);
}; };
struct Emf::EnumerationContext { struct Emf::EnumerationContext {
...@@ -144,7 +143,8 @@ class PRINTING_EXPORT Emf::Enumerator { ...@@ -144,7 +143,8 @@ class PRINTING_EXPORT Emf::Enumerator {
// both optional at the same time or must both be valid. // both optional at the same time or must both be valid.
// Warning: |emf| must be kept valid for the time this object is alive. // Warning: |emf| must be kept valid for the time this object is alive.
Enumerator(const Emf& emf, HDC hdc, const RECT* rect); Enumerator(const Emf& emf, HDC hdc, const RECT* rect);
Enumerator(const Enumerator&) = delete;
Enumerator& operator=(const Enumerator&) = delete;
~Enumerator(); ~Enumerator();
// Retrieves the first Record. // Retrieves the first Record.
...@@ -170,7 +170,6 @@ class PRINTING_EXPORT Emf::Enumerator { ...@@ -170,7 +170,6 @@ class PRINTING_EXPORT Emf::Enumerator {
EnumerationContext context_; EnumerationContext context_;
DISALLOW_COPY_AND_ASSIGN(Enumerator);
}; };
} // namespace printing } // namespace printing
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include "base/macros.h"
#include "base/win/scoped_gdi_object.h" #include "base/win/scoped_gdi_object.h"
#include "base/win/scoped_hdc.h" #include "base/win/scoped_hdc.h"
#include "base/win/scoped_select_object.h" #include "base/win/scoped_select_object.h"
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <vector> #include <vector>
#include "base/containers/span.h" #include "base/containers/span.h"
#include "base/macros.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "printing/mojom/print.mojom-forward.h" #include "printing/mojom/print.mojom-forward.h"
#include "printing/native_drawing_context.h" #include "printing/native_drawing_context.h"
...@@ -39,6 +38,8 @@ namespace printing { ...@@ -39,6 +38,8 @@ namespace printing {
class PRINTING_EXPORT MetafilePlayer { class PRINTING_EXPORT MetafilePlayer {
public: public:
MetafilePlayer(); MetafilePlayer();
MetafilePlayer(const MetafilePlayer&) = delete;
MetafilePlayer& operator=(const MetafilePlayer&) = delete;
virtual ~MetafilePlayer(); virtual ~MetafilePlayer();
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -76,9 +77,6 @@ class PRINTING_EXPORT MetafilePlayer { ...@@ -76,9 +77,6 @@ class PRINTING_EXPORT MetafilePlayer {
// called after the metafile is closed. Returns true if writing succeeded. // called after the metafile is closed. Returns true if writing succeeded.
virtual bool SaveTo(base::File* file) const = 0; virtual bool SaveTo(base::File* file) const = 0;
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
private:
DISALLOW_COPY_AND_ASSIGN(MetafilePlayer);
}; };
// This class creates a graphics context that renders into a data stream // This class creates a graphics context that renders into a data stream
...@@ -86,6 +84,8 @@ class PRINTING_EXPORT MetafilePlayer { ...@@ -86,6 +84,8 @@ class PRINTING_EXPORT MetafilePlayer {
class PRINTING_EXPORT Metafile : public MetafilePlayer { class PRINTING_EXPORT Metafile : public MetafilePlayer {
public: public:
Metafile(); Metafile();
Metafile(const Metafile&) = delete;
Metafile& operator=(const Metafile&) = delete;
~Metafile() override; ~Metafile() override;
// Initializes a fresh new metafile for rendering. Returns false on failure. // Initializes a fresh new metafile for rendering. Returns false on failure.
...@@ -146,9 +146,6 @@ class PRINTING_EXPORT Metafile : public MetafilePlayer { ...@@ -146,9 +146,6 @@ class PRINTING_EXPORT Metafile : public MetafilePlayer {
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
bool SaveTo(base::File* file) const override; bool SaveTo(base::File* file) const override;
#endif // !defined(OS_ANDROID) #endif // !defined(OS_ANDROID)
private:
DISALLOW_COPY_AND_ASSIGN(Metafile);
}; };
} // namespace printing } // namespace printing
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <memory> #include <memory>
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "cc/paint/paint_canvas.h" #include "cc/paint/paint_canvas.h"
#include "printing/common/metafile_utils.h" #include "printing/common/metafile_utils.h"
...@@ -39,6 +38,8 @@ class PRINTING_EXPORT MetafileSkia : public Metafile { ...@@ -39,6 +38,8 @@ class PRINTING_EXPORT MetafileSkia : public Metafile {
// comments before InitFromData()'s implementation. // comments before InitFromData()'s implementation.
MetafileSkia(); MetafileSkia();
MetafileSkia(mojom::SkiaDocumentType type, int document_cookie); MetafileSkia(mojom::SkiaDocumentType type, int document_cookie);
MetafileSkia(const MetafileSkia&) = delete;
MetafileSkia& operator=(const MetafileSkia&) = delete;
~MetafileSkia() override; ~MetafileSkia() override;
// Metafile methods. // Metafile methods.
...@@ -135,8 +136,6 @@ class PRINTING_EXPORT MetafileSkia : public Metafile { ...@@ -135,8 +136,6 @@ class PRINTING_EXPORT MetafileSkia : public Metafile {
std::unique_ptr<MetafileSkiaData> data_; std::unique_ptr<MetafileSkiaData> data_;
ui::AXTreeUpdate accessibility_tree_; ui::AXTreeUpdate accessibility_tree_;
DISALLOW_COPY_AND_ASSIGN(MetafileSkia);
}; };
} // namespace printing } // namespace printing
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <algorithm> #include <algorithm>
#include <string> #include <string>
#include "base/macros.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -79,6 +78,8 @@ class PRINTING_EXPORT PrintSettings { ...@@ -79,6 +78,8 @@ class PRINTING_EXPORT PrintSettings {
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) #endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
PrintSettings(); PrintSettings();
PrintSettings(const PrintSettings&) = delete;
PrintSettings& operator=(const PrintSettings&) = delete;
~PrintSettings(); ~PrintSettings();
// Reinitialize the settings to the default values. // Reinitialize the settings to the default values.
...@@ -327,8 +328,6 @@ class PRINTING_EXPORT PrintSettings { ...@@ -327,8 +328,6 @@ class PRINTING_EXPORT PrintSettings {
// PIN code entered by the user. // PIN code entered by the user.
std::string pin_value_; std::string pin_value_;
#endif #endif
DISALLOW_COPY_AND_ASSIGN(PrintSettings);
}; };
} // namespace printing } // namespace printing
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <memory> #include <memory>
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
...@@ -41,6 +40,8 @@ class PRINTING_EXPORT PrintedDocument ...@@ -41,6 +40,8 @@ class PRINTING_EXPORT PrintedDocument
PrintedDocument(std::unique_ptr<PrintSettings> settings, PrintedDocument(std::unique_ptr<PrintSettings> settings,
const base::string16& name, const base::string16& name,
int cookie); int cookie);
PrintedDocument(const PrintedDocument&) = delete;
PrintedDocument& operator=(const PrintedDocument&) = delete;
#if defined(OS_WIN) #if defined(OS_WIN)
// Indicates that the PDF has been generated and the document is waiting for // Indicates that the PDF has been generated and the document is waiting for
...@@ -206,8 +207,6 @@ class PRINTING_EXPORT PrintedDocument ...@@ -206,8 +207,6 @@ class PRINTING_EXPORT PrintedDocument
// All the immutable members. // All the immutable members.
const Immutable immutable_; const Immutable immutable_;
DISALLOW_COPY_AND_ASSIGN(PrintedDocument);
}; };
} // namespace printing } // namespace printing
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "printing/metafile.h" #include "printing/metafile.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
...@@ -28,6 +27,8 @@ class PRINTING_EXPORT PrintedPage ...@@ -28,6 +27,8 @@ class PRINTING_EXPORT PrintedPage
std::unique_ptr<MetafilePlayer> metafile, std::unique_ptr<MetafilePlayer> metafile,
const gfx::Size& page_size, const gfx::Size& page_size,
const gfx::Rect& page_content_rect); const gfx::Rect& page_content_rect);
PrintedPage(const PrintedPage&) = delete;
PrintedPage& operator=(const PrintedPage&) = delete;
// Getters // Getters
int page_number() const { return page_number_; } int page_number() const { return page_number_; }
...@@ -59,8 +60,6 @@ class PRINTING_EXPORT PrintedPage ...@@ -59,8 +60,6 @@ class PRINTING_EXPORT PrintedPage
// The printable area of the page. // The printable area of the page.
const gfx::Rect page_content_rect_; const gfx::Rect page_content_rect_;
DISALLOW_COPY_AND_ASSIGN(PrintedPage);
}; };
} // namespace printing } // namespace printing
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <string> #include <string>
#include "base/callback.h" #include "base/callback.h"
#include "base/macros.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -46,6 +45,8 @@ class PRINTING_EXPORT PrintingContext { ...@@ -46,6 +45,8 @@ class PRINTING_EXPORT PrintingContext {
FAILED, FAILED,
}; };
PrintingContext(const PrintingContext&) = delete;
PrintingContext& operator=(const PrintingContext&) = delete;
virtual ~PrintingContext(); virtual ~PrintingContext();
// Callback of AskUserForSettings, used to notify the PrintJobWorker when // Callback of AskUserForSettings, used to notify the PrintJobWorker when
...@@ -155,9 +156,6 @@ class PRINTING_EXPORT PrintingContext { ...@@ -155,9 +156,6 @@ class PRINTING_EXPORT PrintingContext {
// The job id for the current job. The value is 0 if no jobs are active. // The job id for the current job. The value is 0 if no jobs are active.
int job_id_; int job_id_;
private:
DISALLOW_COPY_AND_ASSIGN(PrintingContext);
}; };
} // namespace printing } // namespace printing
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/android/scoped_java_ref.h" #include "base/android/scoped_java_ref.h"
#include "base/file_descriptor_posix.h" #include "base/file_descriptor_posix.h"
#include "base/macros.h"
#include "printing/printing_context.h" #include "printing/printing_context.h"
namespace ui { namespace ui {
...@@ -25,6 +24,8 @@ class MetafilePlayer; ...@@ -25,6 +24,8 @@ class MetafilePlayer;
class PRINTING_EXPORT PrintingContextAndroid : public PrintingContext { class PRINTING_EXPORT PrintingContextAndroid : public PrintingContext {
public: public:
explicit PrintingContextAndroid(Delegate* delegate); explicit PrintingContextAndroid(Delegate* delegate);
PrintingContextAndroid(const PrintingContextAndroid&) = delete;
PrintingContextAndroid& operator=(const PrintingContextAndroid&) = delete;
~PrintingContextAndroid() override; ~PrintingContextAndroid() override;
// Called when the page is successfully written to a PDF using the file // Called when the page is successfully written to a PDF using the file
...@@ -80,8 +81,6 @@ class PRINTING_EXPORT PrintingContextAndroid : public PrintingContext { ...@@ -80,8 +81,6 @@ class PRINTING_EXPORT PrintingContextAndroid : public PrintingContext {
PrintSettingsCallback callback_; PrintSettingsCallback callback_;
int fd_ = base::kInvalidFd; int fd_ = base::kInvalidFd;
DISALLOW_COPY_AND_ASSIGN(PrintingContextAndroid);
}; };
} // namespace printing } // namespace printing
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/macros.h"
#include "base/optional.h" #include "base/optional.h"
#include "printing/backend/cups_connection.h" #include "printing/backend/cups_connection.h"
#include "printing/backend/cups_deleters.h" #include "printing/backend/cups_deleters.h"
...@@ -21,6 +20,8 @@ namespace printing { ...@@ -21,6 +20,8 @@ namespace printing {
class PRINTING_EXPORT PrintingContextChromeos : public PrintingContext { class PRINTING_EXPORT PrintingContextChromeos : public PrintingContext {
public: public:
explicit PrintingContextChromeos(Delegate* delegate); explicit PrintingContextChromeos(Delegate* delegate);
PrintingContextChromeos(const PrintingContextChromeos&) = delete;
PrintingContextChromeos& operator=(const PrintingContextChromeos&) = delete;
~PrintingContextChromeos() override; ~PrintingContextChromeos() override;
// PrintingContext implementation. // PrintingContext implementation.
...@@ -52,8 +53,6 @@ class PRINTING_EXPORT PrintingContextChromeos : public PrintingContext { ...@@ -52,8 +53,6 @@ class PRINTING_EXPORT PrintingContextChromeos : public PrintingContext {
std::vector<ScopedCupsOption> cups_options_; std::vector<ScopedCupsOption> cups_options_;
bool send_user_info_; bool send_user_info_;
std::string username_; std::string username_;
DISALLOW_COPY_AND_ASSIGN(PrintingContextChromeos);
}; };
} // namespace printing } // namespace printing
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "base/macros.h"
#include "printing/printing_context.h" #include "printing/printing_context.h"
namespace printing { namespace printing {
...@@ -20,6 +19,8 @@ class PrintDialogGtkInterface; ...@@ -20,6 +19,8 @@ class PrintDialogGtkInterface;
class PRINTING_EXPORT PrintingContextLinux : public PrintingContext { class PRINTING_EXPORT PrintingContextLinux : public PrintingContext {
public: public:
explicit PrintingContextLinux(Delegate* delegate); explicit PrintingContextLinux(Delegate* delegate);
PrintingContextLinux(const PrintingContextLinux&) = delete;
PrintingContextLinux& operator=(const PrintingContextLinux&) = delete;
~PrintingContextLinux() override; ~PrintingContextLinux() override;
// Sets the function that creates the print dialog. // Sets the function that creates the print dialog.
...@@ -57,8 +58,6 @@ class PRINTING_EXPORT PrintingContextLinux : public PrintingContext { ...@@ -57,8 +58,6 @@ class PRINTING_EXPORT PrintingContextLinux : public PrintingContext {
private: private:
base::string16 document_name_; base::string16 document_name_;
PrintDialogGtkInterface* print_dialog_; PrintDialogGtkInterface* print_dialog_;
DISALLOW_COPY_AND_ASSIGN(PrintingContextLinux);
}; };
} // namespace printing } // namespace printing
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <string> #include <string>
#include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
#include "printing/mojom/print.mojom.h" #include "printing/mojom/print.mojom.h"
#include "printing/print_job_constants.h" #include "printing/print_job_constants.h"
#include "printing/printing_context.h" #include "printing/printing_context.h"
...@@ -21,6 +20,8 @@ namespace printing { ...@@ -21,6 +20,8 @@ namespace printing {
class PRINTING_EXPORT PrintingContextMac : public PrintingContext { class PRINTING_EXPORT PrintingContextMac : public PrintingContext {
public: public:
explicit PrintingContextMac(Delegate* delegate); explicit PrintingContextMac(Delegate* delegate);
PrintingContextMac(const PrintingContextMac&) = delete;
PrintingContextMac& operator=(const PrintingContextMac&) = delete;
~PrintingContextMac() override; ~PrintingContextMac() override;
// PrintingContext implementation. // PrintingContext implementation.
...@@ -95,8 +96,6 @@ class PRINTING_EXPORT PrintingContextMac : public PrintingContext { ...@@ -95,8 +96,6 @@ class PRINTING_EXPORT PrintingContextMac : public PrintingContext {
// The current page's context; only valid between NewPage and PageDone call // The current page's context; only valid between NewPage and PageDone call
// pairs. // pairs.
CGContext* context_; CGContext* context_;
DISALLOW_COPY_AND_ASSIGN(PrintingContextMac);
}; };
} // namespace printing } // namespace printing
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <string> #include <string>
#include "base/macros.h"
#include "printing/printing_context.h" #include "printing/printing_context.h"
namespace printing { namespace printing {
...@@ -15,6 +14,9 @@ namespace printing { ...@@ -15,6 +14,9 @@ namespace printing {
class PRINTING_EXPORT PrintingContextNoSystemDialog : public PrintingContext { class PRINTING_EXPORT PrintingContextNoSystemDialog : public PrintingContext {
public: public:
explicit PrintingContextNoSystemDialog(Delegate* delegate); explicit PrintingContextNoSystemDialog(Delegate* delegate);
PrintingContextNoSystemDialog(const PrintingContextNoSystemDialog&) = delete;
PrintingContextNoSystemDialog& operator=(
const PrintingContextNoSystemDialog&) = delete;
~PrintingContextNoSystemDialog() override; ~PrintingContextNoSystemDialog() override;
// PrintingContext implementation. // PrintingContext implementation.
...@@ -34,9 +36,6 @@ class PRINTING_EXPORT PrintingContextNoSystemDialog : public PrintingContext { ...@@ -34,9 +36,6 @@ class PRINTING_EXPORT PrintingContextNoSystemDialog : public PrintingContext {
void Cancel() override; void Cancel() override;
void ReleaseContext() override; void ReleaseContext() override;
printing::NativeDrawingContext context() const override; printing::NativeDrawingContext context() const override;
private:
DISALLOW_COPY_AND_ASSIGN(PrintingContextNoSystemDialog);
}; };
} // namespace printing } // namespace printing
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <string> #include <string>
#include "base/macros.h"
#include "printing/printing_context_win.h" #include "printing/printing_context_win.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
...@@ -21,6 +20,10 @@ class PRINTING_EXPORT PrintingContextSystemDialogWin ...@@ -21,6 +20,10 @@ class PRINTING_EXPORT PrintingContextSystemDialogWin
: public PrintingContextWin { : public PrintingContextWin {
public: public:
explicit PrintingContextSystemDialogWin(Delegate* delegate); explicit PrintingContextSystemDialogWin(Delegate* delegate);
PrintingContextSystemDialogWin(const PrintingContextSystemDialogWin&) =
delete;
PrintingContextSystemDialogWin& operator=(
const PrintingContextSystemDialogWin&) = delete;
~PrintingContextSystemDialogWin() override; ~PrintingContextSystemDialogWin() override;
// PrintingContext implementation. // PrintingContext implementation.
...@@ -44,8 +47,6 @@ class PRINTING_EXPORT PrintingContextSystemDialogWin ...@@ -44,8 +47,6 @@ class PRINTING_EXPORT PrintingContextSystemDialogWin
// Parses the result of a PRINTDLGEX result. // Parses the result of a PRINTDLGEX result.
Result ParseDialogResultEx(const PRINTDLGEX& dialog_options); Result ParseDialogResultEx(const PRINTDLGEX& dialog_options);
DISALLOW_COPY_AND_ASSIGN(PrintingContextSystemDialogWin);
}; };
} // namespace printing } // namespace printing
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "base/macros.h"
#include "printing/printing_context.h" #include "printing/printing_context.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
...@@ -20,6 +19,8 @@ class PrintSettings; ...@@ -20,6 +19,8 @@ class PrintSettings;
class PRINTING_EXPORT PrintingContextWin : public PrintingContext { class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
public: public:
explicit PrintingContextWin(Delegate* delegate); explicit PrintingContextWin(Delegate* delegate);
PrintingContextWin(const PrintingContextWin&) = delete;
PrintingContextWin& operator=(const PrintingContextWin&) = delete;
~PrintingContextWin() override; ~PrintingContextWin() override;
// Prints the document contained in |metafile|. // Prints the document contained in |metafile|.
...@@ -63,8 +64,6 @@ class PRINTING_EXPORT PrintingContextWin : public PrintingContext { ...@@ -63,8 +64,6 @@ class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
// The selected printer context. // The selected printer context.
HDC context_; HDC context_;
DISALLOW_COPY_AND_ASSIGN(PrintingContextWin);
}; };
} // namespace printing } // namespace printing
......
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