Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: pdf/out_of_process_instance.h

Issue 2050973003: PDF accessibility tweaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf_1_hastreedata
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.h
diff --git a/pdf/out_of_process_instance.h b/pdf/out_of_process_instance.h
index 2b0ebee7daebe38aeda07ebfeb535837d5cac898..fb08986078a3dbb2dd3d55fb5c6ab54729d46838 100644
--- a/pdf/out_of_process_instance.h
+++ b/pdf/out_of_process_instance.h
@@ -79,6 +79,9 @@ class OutOfProcessInstance : public pp::Instance,
void GetPrintPresetOptionsFromDocument(PP_PdfPrintPresetOptions_Dev* options);
void EnableAccessibility();
+ // Start loading accessibility information.
+ void LoadAccessibility();
+
// Send accessibility information about the given page index.
void SendNextAccessibilityPage(int32_t page_index);
@@ -346,8 +349,13 @@ class OutOfProcessInstance : public pp::Instance,
// toolbar.
int top_toolbar_height_;
- // Whether we should send accessibility information about the loaded PDF.
- bool accessibility_enabled_;
+ // The current state of accessibility: either off, enabled but waiting
+ // for the document to load, or fully loaded.
+ enum AccessibilityState {
+ ACCESSIBILITY_STATE_OFF,
+ ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load.
+ ACCESSIBILITY_STATE_LOADED
+ } accessibility_state_;
DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance);
};
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698