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_INSTANCE_H_ | 5 #ifndef PDF_INSTANCE_H_ |
6 #define PDF_INSTANCE_H_ | 6 #define PDF_INSTANCE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Called when the control timer is fired. | 123 // Called when the control timer is fired. |
124 void OnControlTimerFired(int32_t, | 124 void OnControlTimerFired(int32_t, |
125 const uint32& control_id, | 125 const uint32& control_id, |
126 const uint32& timer_id); | 126 const uint32& timer_id); |
127 | 127 |
128 // Called to print without re-entrancy issues. | 128 // Called to print without re-entrancy issues. |
129 void OnPrint(int32_t); | 129 void OnPrint(int32_t); |
130 | 130 |
131 // PDFEngine::Client implementation. | 131 // PDFEngine::Client implementation. |
132 virtual void DocumentSizeUpdated(const pp::Size& size); | 132 void DocumentSizeUpdated(const pp::Size& size) override; |
133 virtual void Invalidate(const pp::Rect& rect); | 133 void Invalidate(const pp::Rect& rect) override; |
134 virtual void Scroll(const pp::Point& point); | 134 void Scroll(const pp::Point& point) override; |
135 virtual void ScrollToX(int position); | 135 void ScrollToX(int position) override; |
136 virtual void ScrollToY(int position); | 136 void ScrollToY(int position) override; |
137 virtual void ScrollToPage(int page); | 137 void ScrollToPage(int page) override; |
138 virtual void NavigateTo(const std::string& url, bool open_in_new_tab); | 138 void NavigateTo(const std::string& url, bool open_in_new_tab) override; |
139 virtual void UpdateCursor(PP_CursorType_Dev cursor); | 139 void UpdateCursor(PP_CursorType_Dev cursor) override; |
140 virtual void UpdateTickMarks(const std::vector<pp::Rect>& tickmarks); | 140 void UpdateTickMarks(const std::vector<pp::Rect>& tickmarks) override; |
141 virtual void NotifyNumberOfFindResultsChanged(int total, bool final_result); | 141 void NotifyNumberOfFindResultsChanged(int total, bool final_result) override; |
142 virtual void NotifySelectedFindResultChanged(int current_find_index); | 142 void NotifySelectedFindResultChanged(int current_find_index) override; |
143 virtual void GetDocumentPassword( | 143 void GetDocumentPassword( |
144 pp::CompletionCallbackWithOutput<pp::Var> callback); | 144 pp::CompletionCallbackWithOutput<pp::Var> callback) override; |
145 virtual void Alert(const std::string& message); | 145 void Alert(const std::string& message) override; |
146 virtual bool Confirm(const std::string& message); | 146 bool Confirm(const std::string& message) override; |
147 virtual std::string Prompt(const std::string& question, | 147 std::string Prompt(const std::string& question, |
148 const std::string& default_answer); | 148 const std::string& default_answer) override; |
149 virtual std::string GetURL(); | 149 std::string GetURL() override; |
150 virtual void Email(const std::string& to, | 150 void Email(const std::string& to, |
151 const std::string& cc, | 151 const std::string& cc, |
152 const std::string& bcc, | 152 const std::string& bcc, |
153 const std::string& subject, | 153 const std::string& subject, |
154 const std::string& body); | 154 const std::string& body) override; |
155 virtual void Print(); | 155 void Print() override; |
156 virtual void SubmitForm(const std::string& url, | 156 void SubmitForm(const std::string& url, |
157 const void* data, | 157 const void* data, |
158 int length); | 158 int length) override; |
159 virtual std::string ShowFileSelectionDialog(); | 159 std::string ShowFileSelectionDialog(); |
160 virtual pp::URLLoader CreateURLLoader(); | 160 pp::URLLoader CreateURLLoader() override; |
161 virtual void ScheduleCallback(int id, int delay_in_ms); | 161 void ScheduleCallback(int id, int delay_in_ms) override; |
162 virtual void SearchString(const base::char16* string, | 162 void SearchString(const base::char16* string, |
163 const base::char16* term, | 163 const base::char16* term, |
164 bool case_sensitive, | 164 bool case_sensitive, |
165 std::vector<SearchStringResult>* results); | 165 std::vector<SearchStringResult>* results) override; |
166 virtual void DocumentPaintOccurred(); | 166 void DocumentPaintOccurred() override; |
167 virtual void DocumentLoadComplete(int page_count); | 167 void DocumentLoadComplete(int page_count) override; |
168 virtual void DocumentLoadFailed(); | 168 void DocumentLoadFailed() override; |
169 virtual pp::Instance* GetPluginInstance(); | 169 pp::Instance* GetPluginInstance() override; |
170 virtual void DocumentHasUnsupportedFeature(const std::string& feature); | 170 void DocumentHasUnsupportedFeature(const std::string& feature) override; |
171 virtual void DocumentLoadProgress(uint32 available, uint32 doc_size); | 171 void DocumentLoadProgress(uint32 available, uint32 doc_size) override; |
172 virtual void FormTextFieldFocusChange(bool in_focus); | 172 void FormTextFieldFocusChange(bool in_focus) override; |
173 virtual bool IsPrintPreview(); | 173 bool IsPrintPreview() override; |
174 | 174 |
175 // ControlOwner implementation. | 175 // ControlOwner implementation. |
176 virtual void OnEvent(uint32 control_id, uint32 event_id, void* data); | 176 void OnEvent(uint32 control_id, uint32 event_id, void* data) override; |
177 virtual void Invalidate(uint32 control_id, const pp::Rect& rc); | 177 void Invalidate(uint32 control_id, const pp::Rect& rc) override; |
178 virtual uint32 ScheduleTimer(uint32 control_id, uint32 timeout_ms); | 178 uint32 ScheduleTimer(uint32 control_id, uint32 timeout_ms) override; |
179 virtual void SetEventCapture(uint32 control_id, bool set_capture); | 179 void SetEventCapture(uint32 control_id, bool set_capture) override; |
180 virtual void SetCursor(uint32 control_id, PP_CursorType_Dev cursor_type); | 180 void SetCursor(uint32 control_id, PP_CursorType_Dev cursor_type) override; |
181 virtual pp::Instance* GetInstance(); | 181 pp::Instance* GetInstance() override; |
182 | 182 |
183 bool dont_paint() const { return dont_paint_; } | 183 bool dont_paint() const { return dont_paint_; } |
184 void set_dont_paint(bool dont_paint) { dont_paint_ = dont_paint; } | 184 void set_dont_paint(bool dont_paint) { dont_paint_ = dont_paint; } |
185 | 185 |
186 // Called by PDFScriptableObject. | 186 // Called by PDFScriptableObject. |
187 bool HasScriptableMethod(const pp::Var& method, pp::Var* exception); | 187 bool HasScriptableMethod(const pp::Var& method, pp::Var* exception); |
188 pp::Var CallScriptableMethod(const pp::Var& method, | 188 pp::Var CallScriptableMethod(const pp::Var& method, |
189 const std::vector<pp::Var>& args, | 189 const std::vector<pp::Var>& args, |
190 pp::Var* exception); | 190 pp::Var* exception); |
191 | 191 |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 const std::vector<pp::Var>& args, | 522 const std::vector<pp::Var>& args, |
523 pp::Var* exception); | 523 pp::Var* exception); |
524 | 524 |
525 private: | 525 private: |
526 Instance* instance_; | 526 Instance* instance_; |
527 }; | 527 }; |
528 | 528 |
529 } // namespace chrome_pdf | 529 } // namespace chrome_pdf |
530 | 530 |
531 #endif // PDF_INSTANCE_H_ | 531 #endif // PDF_INSTANCE_H_ |
OLD | NEW |