Commit 16373f83 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Reorder pdfium_engine.h.

- Reorder overrides that are incorrectly grouped.
- Separate a non-overridden method from the overrides group.
- Reorder an enum declaration and mention why it is public.

Change-Id: I9d359631c8e8be21780a656866a91fac6e62d3c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363634Reviewed-by: default avatarK. Moon <kmoon@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799338}
parent fc52e389
...@@ -57,6 +57,12 @@ class PDFiumEngine : public PDFEngine, ...@@ -57,6 +57,12 @@ class PDFiumEngine : public PDFEngine,
public DocumentLoader::Client, public DocumentLoader::Client,
public IFSDK_PAUSE { public IFSDK_PAUSE {
public: public:
// State transition when tabbing forward:
// None -> Document -> Page -> None (when focusable annotations on all pages
// are done).
// Exposed for testing.
enum class FocusElementType { kNone, kDocument, kPage };
PDFiumEngine(PDFEngine::Client* client, bool enable_javascript); PDFiumEngine(PDFEngine::Client* client, bool enable_javascript);
PDFiumEngine(const PDFiumEngine&) = delete; PDFiumEngine(const PDFiumEngine&) = delete;
PDFiumEngine& operator=(const PDFiumEngine&) = delete; PDFiumEngine& operator=(const PDFiumEngine&) = delete;
...@@ -76,7 +82,7 @@ class PDFiumEngine : public PDFEngine, ...@@ -76,7 +82,7 @@ class PDFiumEngine : public PDFEngine,
static void OverrideSetLinkUnderCursorFunctionForTesting( static void OverrideSetLinkUnderCursorFunctionForTesting(
SetLinkUnderCursorFunction function); SetLinkUnderCursorFunction function);
// PDFEngine implementation. // PDFEngine:
bool New(const char* url, const char* headers) override; bool New(const char* url, const char* headers) override;
void PageOffsetUpdated(const pp::Point& page_offset) override; void PageOffsetUpdated(const pp::Point& page_offset) override;
void PluginSizeUpdated(const gfx::Size& size) override; void PluginSizeUpdated(const gfx::Size& size) override;
...@@ -162,19 +168,20 @@ class PDFiumEngine : public PDFEngine, ...@@ -162,19 +168,20 @@ class PDFiumEngine : public PDFEngine,
uint32_t* selection_start_char_index, uint32_t* selection_start_char_index,
uint32_t* selection_end_page_index, uint32_t* selection_end_page_index,
uint32_t* selection_end_char_index) override; uint32_t* selection_end_char_index) override;
void KillFormFocus() override;
void UpdateFocus(bool has_focus) override;
PP_PrivateAccessibilityFocusInfo GetFocusInfo() override;
uint32_t GetLoadedByteSize() override;
bool ReadLoadedBytes(uint32_t length, void* buffer) override;
// DocumentLoader::Client implementation. // DocumentLoader::Client:
pp::Instance* GetPluginInstance() override; pp::Instance* GetPluginInstance() override;
std::unique_ptr<URLLoaderWrapper> CreateURLLoader() override; std::unique_ptr<URLLoaderWrapper> CreateURLLoader() override;
void OnPendingRequestComplete() override; void OnPendingRequestComplete() override;
void OnNewDataReceived() override; void OnNewDataReceived() override;
void OnDocumentComplete() override; void OnDocumentComplete() override;
void OnDocumentCanceled() override; void OnDocumentCanceled() override;
void KillFormFocus() override;
void UpdateFocus(bool has_focus) override;
PP_PrivateAccessibilityFocusInfo GetFocusInfo() override;
uint32_t GetLoadedByteSize() override;
bool ReadLoadedBytes(uint32_t length, void* buffer) override;
#if defined(PDF_ENABLE_XFA) #if defined(PDF_ENABLE_XFA)
void UpdatePageCount(); void UpdatePageCount();
#endif // defined(PDF_ENABLE_XFA) #endif // defined(PDF_ENABLE_XFA)
...@@ -185,11 +192,6 @@ class PDFiumEngine : public PDFEngine, ...@@ -185,11 +192,6 @@ class PDFiumEngine : public PDFEngine,
FPDF_DOCUMENT doc() const; FPDF_DOCUMENT doc() const;
FPDF_FORMHANDLE form() const; FPDF_FORMHANDLE form() const;
// State transition when tabbing forward:
// None -> Document -> Page -> None (when focusable annotations on all pages
// are done).
enum class FocusElementType { kNone, kDocument, kPage };
private: private:
// This helper class is used to detect the difference in selection between // This helper class is used to detect the difference in selection between
// construction and destruction. At destruction, it invalidates all the // construction and destruction. At destruction, it invalidates all the
......
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