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

Side by Side Diff: pdf/out_of_process_instance.h

Issue 2371483002: Update PDF accessibility when zoom level changes (Closed)
Patch Set: Cleaned up, ready for review Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_ 5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_
6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const PP_PrintPageNumberRange_Dev* page_ranges, 72 const PP_PrintPageNumberRange_Dev* page_ranges,
73 uint32_t page_range_count) override; 73 uint32_t page_range_count) override;
74 void PrintEnd() override; 74 void PrintEnd() override;
75 bool IsPrintScalingDisabled() override; 75 bool IsPrintScalingDisabled() override;
76 76
77 // pp::Private implementation. 77 // pp::Private implementation.
78 pp::Var GetLinkAtPosition(const pp::Point& point); 78 pp::Var GetLinkAtPosition(const pp::Point& point);
79 void GetPrintPresetOptionsFromDocument(PP_PdfPrintPresetOptions_Dev* options); 79 void GetPrintPresetOptionsFromDocument(PP_PdfPrintPresetOptions_Dev* options);
80 void EnableAccessibility(); 80 void EnableAccessibility();
81 81
82 // Start loading accessibility information.
83 void LoadAccessibility();
84
85 // Send accessibility information about the given page index.
86 void SendNextAccessibilityPage(int32_t page_index);
87
88 void FlushCallback(int32_t result); 82 void FlushCallback(int32_t result);
89 void DidOpen(int32_t result); 83 void DidOpen(int32_t result);
90 void DidOpenPreview(int32_t result); 84 void DidOpenPreview(int32_t result);
91 85
92 // Called when the timer is fired. 86 // Called when the timer is fired.
93 void OnClientTimerFired(int32_t id); 87 void OnClientTimerFired(int32_t id);
94 88
95 // Called to print without re-entrancy issues. 89 // Called to print without re-entrancy issues.
96 void OnPrint(int32_t); 90 void OnPrint(int32_t);
97 91
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void (OutOfProcessInstance::* method)(int32_t)); 169 void (OutOfProcessInstance::* method)(int32_t));
176 170
177 // Creates a URL loader and allows it to access all urls, i.e. not just the 171 // Creates a URL loader and allows it to access all urls, i.e. not just the
178 // frame's origin. 172 // frame's origin.
179 pp::URLLoader CreateURLLoaderInternal(); 173 pp::URLLoader CreateURLLoaderInternal();
180 174
181 void FormDidOpen(int32_t result); 175 void FormDidOpen(int32_t result);
182 176
183 void UserMetricsRecordAction(const std::string& action); 177 void UserMetricsRecordAction(const std::string& action);
184 178
179 // Start loading accessibility information.
180 void LoadAccessibility();
181
182 // Send accessibility information about the given page index.
183 void SendNextAccessibilityPage(int32_t page_index);
184
185 // Send the accessibility information about the current viewport.
raymes 2016/09/27 05:05:31 nit: fill 80 chars
dmazzoni 2016/09/27 16:19:32 Done
186 // This is done once when accessibility is first loaded and again
187 // when the geometry changes.
188 void SendAccessibilityViewportInfo();
189
185 enum DocumentLoadState { 190 enum DocumentLoadState {
186 LOAD_STATE_LOADING, 191 LOAD_STATE_LOADING,
187 LOAD_STATE_COMPLETE, 192 LOAD_STATE_COMPLETE,
188 LOAD_STATE_FAILED, 193 LOAD_STATE_FAILED,
189 }; 194 };
190 195
191 // Set new zoom scale. 196 // Set new zoom scale.
192 void SetZoom(double scale); 197 void SetZoom(double scale);
193 198
194 // Reduces the document to 1 page and appends |print_preview_page_count_| 199 // Reduces the document to 1 page and appends |print_preview_page_count_|
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load. 362 ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load.
358 ACCESSIBILITY_STATE_LOADED 363 ACCESSIBILITY_STATE_LOADED
359 } accessibility_state_; 364 } accessibility_state_;
360 365
361 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); 366 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance);
362 }; 367 };
363 368
364 } // namespace chrome_pdf 369 } // namespace chrome_pdf
365 370
366 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ 371 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698