[PDF Ink Signatures] Fix build when enable_pdf_ink2=false
Fix incorrect/missing conditional includes to make this work. Change-Id: I715b38e2d18b4d8ed39de85c6d2acc61e6ec0b45 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5906381 Reviewed-by: Andy Phan <andyphan@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1363344}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
23694b80b4
commit
048cbc3c4b
@ -40,7 +40,6 @@
|
|||||||
#include "pdf/pdf_features.h"
|
#include "pdf/pdf_features.h"
|
||||||
#include "pdf/test/mock_web_associated_url_loader.h"
|
#include "pdf/test/mock_web_associated_url_loader.h"
|
||||||
#include "pdf/test/mouse_event_builder.h"
|
#include "pdf/test/mouse_event_builder.h"
|
||||||
#include "pdf/test/pdf_ink_test_helpers.h"
|
|
||||||
#include "pdf/test/test_helpers.h"
|
#include "pdf/test/test_helpers.h"
|
||||||
#include "pdf/test/test_pdfium_engine.h"
|
#include "pdf/test/test_pdfium_engine.h"
|
||||||
#include "printing/metafile_skia.h"
|
#include "printing/metafile_skia.h"
|
||||||
@ -87,6 +86,10 @@
|
|||||||
#include "ui/latency/latency_info.h"
|
#include "ui/latency/latency_info.h"
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
|
#include "pdf/test/pdf_ink_test_helpers.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace chrome_pdf {
|
namespace chrome_pdf {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -130,9 +130,9 @@ class MockTestClient : public TestClient {
|
|||||||
MOCK_METHOD(bool, IsPrintPreview, (), (const override));
|
MOCK_METHOD(bool, IsPrintPreview, (), (const override));
|
||||||
MOCK_METHOD(void, DocumentFocusChanged, (bool), (override));
|
MOCK_METHOD(void, DocumentFocusChanged, (bool), (override));
|
||||||
MOCK_METHOD(void, SetLinkUnderCursor, (const std::string&), (override));
|
MOCK_METHOD(void, SetLinkUnderCursor, (const std::string&), (override));
|
||||||
#if BUILDFLAG(ENABLE_PDF)
|
#if BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
MOCK_METHOD(bool, IsInAnnotationMode, (), (const override));
|
MOCK_METHOD(bool, IsInAnnotationMode, (), (const override));
|
||||||
#endif // BUILDFLAG(ENABLE_PDF)
|
#endif // BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -72,10 +72,10 @@ bool TestClient::IsValidLink(const std::string& url) {
|
|||||||
return !url.empty();
|
return !url.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PDF)
|
#if BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
bool TestClient::IsInAnnotationMode() const {
|
bool TestClient::IsInAnnotationMode() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif // BUILDFLAG(ENABLE_PDF)
|
#endif // BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
|
|
||||||
} // namespace chrome_pdf
|
} // namespace chrome_pdf
|
||||||
|
@ -44,9 +44,9 @@ class TestClient : public PDFiumEngineClient {
|
|||||||
void SetSelectedText(const std::string& selected_text) override;
|
void SetSelectedText(const std::string& selected_text) override;
|
||||||
void SetLinkUnderCursor(const std::string& link_under_cursor) override;
|
void SetLinkUnderCursor(const std::string& link_under_cursor) override;
|
||||||
bool IsValidLink(const std::string& url) override;
|
bool IsValidLink(const std::string& url) override;
|
||||||
#if BUILDFLAG(ENABLE_PDF)
|
#if BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
bool IsInAnnotationMode() const override;
|
bool IsInAnnotationMode() const override;
|
||||||
#endif // BUILDFLAG(ENABLE_PDF)
|
#endif // BUILDFLAG(ENABLE_PDF_INK2)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Not owned. Expected to dangle briefly, as the engine usually is destroyed
|
// Not owned. Expected to dangle briefly, as the engine usually is destroyed
|
||||||
|
Reference in New Issue
Block a user