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 <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void DidOpen(int32_t result); | 84 void DidOpen(int32_t result); |
85 void DidOpenPreview(int32_t result); | 85 void DidOpenPreview(int32_t result); |
86 | 86 |
87 // Called when the timer is fired. | 87 // Called when the timer is fired. |
88 void OnClientTimerFired(int32_t id); | 88 void OnClientTimerFired(int32_t id); |
89 | 89 |
90 // Called to print without re-entrancy issues. | 90 // Called to print without re-entrancy issues. |
91 void OnPrint(int32_t); | 91 void OnPrint(int32_t); |
92 | 92 |
93 // PDFEngine::Client implementation. | 93 // PDFEngine::Client implementation. |
94 virtual void DocumentSizeUpdated(const pp::Size& size); | 94 void DocumentSizeUpdated(const pp::Size& size) override; |
95 virtual void Invalidate(const pp::Rect& rect); | 95 void Invalidate(const pp::Rect& rect) override; |
96 virtual void Scroll(const pp::Point& point); | 96 void Scroll(const pp::Point& point) override; |
97 virtual void ScrollToX(int position); | 97 void ScrollToX(int position) override; |
98 virtual void ScrollToY(int position); | 98 void ScrollToY(int position) override; |
99 virtual void ScrollToPage(int page); | 99 void ScrollToPage(int page) override; |
100 virtual void NavigateTo(const std::string& url, bool open_in_new_tab); | 100 void NavigateTo(const std::string& url, bool open_in_new_tab) override; |
101 virtual void UpdateCursor(PP_CursorType_Dev cursor); | 101 void UpdateCursor(PP_CursorType_Dev cursor) override; |
102 virtual void UpdateTickMarks(const std::vector<pp::Rect>& tickmarks); | 102 void UpdateTickMarks(const std::vector<pp::Rect>& tickmarks) override; |
103 virtual void NotifyNumberOfFindResultsChanged(int total, bool final_result); | 103 void NotifyNumberOfFindResultsChanged(int total, bool final_result) override; |
104 virtual void NotifySelectedFindResultChanged(int current_find_index); | 104 void NotifySelectedFindResultChanged(int current_find_index) override; |
105 virtual void GetDocumentPassword( | 105 void GetDocumentPassword( |
106 pp::CompletionCallbackWithOutput<pp::Var> callback); | 106 pp::CompletionCallbackWithOutput<pp::Var> callback) override; |
107 virtual void Alert(const std::string& message); | 107 void Alert(const std::string& message) override; |
108 virtual bool Confirm(const std::string& message); | 108 bool Confirm(const std::string& message) override; |
109 virtual std::string Prompt(const std::string& question, | 109 std::string Prompt(const std::string& question, |
110 const std::string& default_answer); | 110 const std::string& default_answer) override; |
111 virtual std::string GetURL(); | 111 std::string GetURL() override; |
112 virtual void Email(const std::string& to, | 112 void Email(const std::string& to, |
113 const std::string& cc, | 113 const std::string& cc, |
114 const std::string& bcc, | 114 const std::string& bcc, |
115 const std::string& subject, | 115 const std::string& subject, |
116 const std::string& body); | 116 const std::string& body) override; |
117 virtual void Print(); | 117 void Print() override; |
118 virtual void SubmitForm(const std::string& url, | 118 void SubmitForm(const std::string& url, |
119 const void* data, | 119 const void* data, |
120 int length); | 120 int length) override; |
121 virtual std::string ShowFileSelectionDialog(); | 121 std::string ShowFileSelectionDialog() override; |
122 virtual pp::URLLoader CreateURLLoader(); | 122 pp::URLLoader CreateURLLoader() override; |
123 virtual void ScheduleCallback(int id, int delay_in_ms); | 123 void ScheduleCallback(int id, int delay_in_ms) override; |
124 virtual 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); | 127 std::vector<SearchStringResult>* results) override; |
128 virtual void DocumentPaintOccurred(); | 128 void DocumentPaintOccurred() override; |
129 virtual void DocumentLoadComplete(int page_count); | 129 void DocumentLoadComplete(int page_count) override; |
130 virtual void DocumentLoadFailed(); | 130 void DocumentLoadFailed() override; |
131 virtual pp::Instance* GetPluginInstance(); | 131 pp::Instance* GetPluginInstance() override; |
132 virtual void DocumentHasUnsupportedFeature(const std::string& feature); | 132 void DocumentHasUnsupportedFeature(const std::string& feature) override; |
133 virtual void DocumentLoadProgress(uint32 available, uint32 doc_size); | 133 void DocumentLoadProgress(uint32 available, uint32 doc_size) override; |
134 virtual void FormTextFieldFocusChange(bool in_focus); | 134 void FormTextFieldFocusChange(bool in_focus) override; |
135 virtual bool IsPrintPreview(); | 135 bool IsPrintPreview() override; |
136 | 136 |
137 // PreviewModeClient::Client implementation. | 137 // PreviewModeClient::Client implementation. |
138 virtual void PreviewDocumentLoadComplete() override; | 138 void PreviewDocumentLoadComplete() override; |
139 virtual void PreviewDocumentLoadFailed() override; | 139 void PreviewDocumentLoadFailed() override; |
140 | 140 |
141 // Helper functions for implementing PPP_PDF. | 141 // Helper functions for implementing PPP_PDF. |
142 void RotateClockwise(); | 142 void RotateClockwise(); |
143 void RotateCounterclockwise(); | 143 void RotateCounterclockwise(); |
144 | 144 |
145 private: | 145 private: |
146 void ResetRecentlySentFindUpdate(int32_t); | 146 void ResetRecentlySentFindUpdate(int32_t); |
147 | 147 |
148 // Called whenever the plugin geometry changes to update the location of the | 148 // Called whenever the plugin geometry changes to update the location of the |
149 // background parts, and notifies the pdf engine. | 149 // background parts, and notifies the pdf engine. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 // zooming the plugin so that flickering doesn't occur while zooming. | 337 // zooming the plugin so that flickering doesn't occur while zooming. |
338 bool stop_scrolling_; | 338 bool stop_scrolling_; |
339 | 339 |
340 // The callback for receiving the password from the page. | 340 // The callback for receiving the password from the page. |
341 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; | 341 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; |
342 }; | 342 }; |
343 | 343 |
344 } // namespace chrome_pdf | 344 } // namespace chrome_pdf |
345 | 345 |
346 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 346 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
OLD | NEW |