mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 78.0.3904.0 (#693954)
This commit is contained in:
@@ -6,15 +6,15 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
CefPrintSettingsImpl::CefPrintSettingsImpl(printing::PrintSettings* value,
|
||||
bool will_delete,
|
||||
bool read_only)
|
||||
: CefValueBase<CefPrintSettings, printing::PrintSettings>(
|
||||
value,
|
||||
NULL,
|
||||
will_delete ? kOwnerWillDelete : kOwnerNoDelete,
|
||||
read_only,
|
||||
NULL) {}
|
||||
CefPrintSettingsImpl::CefPrintSettingsImpl(
|
||||
std::unique_ptr<printing::PrintSettings> settings,
|
||||
bool read_only)
|
||||
: CefValueBase<CefPrintSettings, printing::PrintSettings>(settings.get(),
|
||||
nullptr,
|
||||
kOwnerNoDelete,
|
||||
read_only,
|
||||
nullptr),
|
||||
settings_(std::move(settings)) {}
|
||||
|
||||
bool CefPrintSettingsImpl::IsValid() {
|
||||
return !detached();
|
||||
@@ -24,13 +24,6 @@ bool CefPrintSettingsImpl::IsReadOnly() {
|
||||
return read_only();
|
||||
}
|
||||
|
||||
CefRefPtr<CefPrintSettings> CefPrintSettingsImpl::Copy() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
printing::PrintSettings* new_settings = new printing::PrintSettings;
|
||||
*new_settings = const_value();
|
||||
return new CefPrintSettingsImpl(new_settings, true, false);
|
||||
}
|
||||
|
||||
void CefPrintSettingsImpl::SetOrientation(bool landscape) {
|
||||
CEF_VALUE_VERIFY_RETURN_VOID(true);
|
||||
mutable_value()->SetOrientation(landscape);
|
||||
@@ -155,9 +148,15 @@ CefPrintSettings::DuplexMode CefPrintSettingsImpl::GetDuplexMode() {
|
||||
return static_cast<DuplexMode>(const_value().duplex_mode());
|
||||
}
|
||||
|
||||
std::unique_ptr<printing::PrintSettings> CefPrintSettingsImpl::TakeOwnership() {
|
||||
Detach(nullptr);
|
||||
return std::move(settings_);
|
||||
}
|
||||
|
||||
// CefPrintSettings implementation.
|
||||
|
||||
// static
|
||||
CefRefPtr<CefPrintSettings> CefPrintSettings::Create() {
|
||||
return new CefPrintSettingsImpl(new printing::PrintSettings(), true, false);
|
||||
return new CefPrintSettingsImpl(std::make_unique<printing::PrintSettings>(),
|
||||
false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user