OLD | NEW |
---|---|
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 std::string ShowFileSelectionDialog() override; | 121 std::string ShowFileSelectionDialog() override; |
122 pp::URLLoader CreateURLLoader() override; | 122 pp::URLLoader CreateURLLoader() override; |
123 void ScheduleCallback(int id, int delay_in_ms) override; | 123 void ScheduleCallback(int id, int delay_in_ms) override; |
124 void SearchString(const base::char16* string, | 124 void SearchString(const base::char16* string, |
125 const base::char16* term, | 125 const base::char16* term, |
126 bool case_sensitive, | 126 bool case_sensitive, |
127 std::vector<SearchStringResult>* results) override; | 127 std::vector<SearchStringResult>* results) override; |
128 void DocumentPaintOccurred() override; | 128 void DocumentPaintOccurred() override; |
129 void DocumentLoadComplete(int page_count) override; | 129 void DocumentLoadComplete(int page_count) override; |
130 void DocumentLoadFailed() override; | 130 void DocumentLoadFailed() override; |
131 void FontSubstituted() override; | |
131 pp::Instance* GetPluginInstance() override; | 132 pp::Instance* GetPluginInstance() override; |
132 void DocumentHasUnsupportedFeature(const std::string& feature) override; | 133 void DocumentHasUnsupportedFeature(const std::string& feature) override; |
133 void DocumentLoadProgress(uint32_t available, uint32_t doc_size) override; | 134 void DocumentLoadProgress(uint32_t available, uint32_t doc_size) override; |
134 void FormTextFieldFocusChange(bool in_focus) override; | 135 void FormTextFieldFocusChange(bool in_focus) override; |
135 bool IsPrintPreview() override; | 136 bool IsPrintPreview() override; |
136 uint32_t GetBackgroundColor() override; | 137 uint32_t GetBackgroundColor() override; |
137 void IsSelectingChanged(bool is_selecting) override; | 138 void IsSelectingChanged(bool is_selecting) override; |
138 | 139 |
139 // PreviewModeClient::Client implementation. | 140 // PreviewModeClient::Client implementation. |
140 void PreviewDocumentLoadComplete() override; | 141 void PreviewDocumentLoadComplete() override; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
302 pp::UMAPrivate uma_; | 303 pp::UMAPrivate uma_; |
303 | 304 |
304 // Used so that we only tell the browser once about an unsupported feature, to | 305 // Used so that we only tell the browser once about an unsupported feature, to |
305 // avoid the infobar going up more than once. | 306 // avoid the infobar going up more than once. |
306 bool told_browser_about_unsupported_feature_; | 307 bool told_browser_about_unsupported_feature_; |
307 | 308 |
308 // Keeps track of which unsupported features we reported, so we avoid spamming | 309 // Keeps track of which unsupported features we reported, so we avoid spamming |
309 // the stats if a feature shows up many times per document. | 310 // the stats if a feature shows up many times per document. |
310 std::set<std::string> unsupported_features_reported_; | 311 std::set<std::string> unsupported_features_reported_; |
311 | 312 |
313 // Keeps track of whether font substitution has been reported, so we avoid | |
314 // spamming the stats if a document requested multiple substitutes. | |
315 bool font_substitution_reported; | |
Lei Zhang
2016/10/05 20:48:09
members need a trailing underscore.
npm
2016/10/06 15:20:47
Done.
| |
316 | |
312 // Number of pages in print preview mode, 0 if not in print preview mode. | 317 // Number of pages in print preview mode, 0 if not in print preview mode. |
313 int print_preview_page_count_; | 318 int print_preview_page_count_; |
314 std::vector<int> print_preview_page_numbers_; | 319 std::vector<int> print_preview_page_numbers_; |
315 | 320 |
316 // Used to manage loaded print preview page information. A |PreviewPageInfo| | 321 // Used to manage loaded print preview page information. A |PreviewPageInfo| |
317 // consists of data source url string and the page index in the destination | 322 // consists of data source url string and the page index in the destination |
318 // document. | 323 // document. |
319 typedef std::pair<std::string, int> PreviewPageInfo; | 324 typedef std::pair<std::string, int> PreviewPageInfo; |
320 std::queue<PreviewPageInfo> preview_pages_info_; | 325 std::queue<PreviewPageInfo> preview_pages_info_; |
321 | 326 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load. | 367 ACCESSIBILITY_STATE_PENDING, // Enabled but waiting for doc to load. |
363 ACCESSIBILITY_STATE_LOADED | 368 ACCESSIBILITY_STATE_LOADED |
364 } accessibility_state_; | 369 } accessibility_state_; |
365 | 370 |
366 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); | 371 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); |
367 }; | 372 }; |
368 | 373 |
369 } // namespace chrome_pdf | 374 } // namespace chrome_pdf |
370 | 375 |
371 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 376 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
OLD | NEW |