| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 public PaintManager::Client, | 42 public PaintManager::Client, |
| 43 public PDFEngine::Client, | 43 public PDFEngine::Client, |
| 44 public PreviewModeClient::Client { | 44 public PreviewModeClient::Client { |
| 45 public: | 45 public: |
| 46 explicit OutOfProcessInstance(PP_Instance instance); | 46 explicit OutOfProcessInstance(PP_Instance instance); |
| 47 virtual ~OutOfProcessInstance(); | 47 virtual ~OutOfProcessInstance(); |
| 48 | 48 |
| 49 // pp::Instance implementation. | 49 // pp::Instance implementation. |
| 50 virtual bool Init(uint32_t argc, | 50 virtual bool Init(uint32_t argc, |
| 51 const char* argn[], | 51 const char* argn[], |
| 52 const char* argv[]) OVERRIDE; | 52 const char* argv[]) override; |
| 53 virtual void HandleMessage(const pp::Var& message) OVERRIDE; | 53 virtual void HandleMessage(const pp::Var& message) override; |
| 54 virtual bool HandleInputEvent(const pp::InputEvent& event) OVERRIDE; | 54 virtual bool HandleInputEvent(const pp::InputEvent& event) override; |
| 55 virtual void DidChangeView(const pp::View& view) OVERRIDE; | 55 virtual void DidChangeView(const pp::View& view) override; |
| 56 | 56 |
| 57 // pp::Find_Private implementation. | 57 // pp::Find_Private implementation. |
| 58 virtual bool StartFind(const std::string& text, bool case_sensitive) OVERRIDE; | 58 virtual bool StartFind(const std::string& text, bool case_sensitive) override; |
| 59 virtual void SelectFindResult(bool forward) OVERRIDE; | 59 virtual void SelectFindResult(bool forward) override; |
| 60 virtual void StopFind() OVERRIDE; | 60 virtual void StopFind() override; |
| 61 | 61 |
| 62 // pp::PaintManager::Client implementation. | 62 // pp::PaintManager::Client implementation. |
| 63 virtual void OnPaint(const std::vector<pp::Rect>& paint_rects, | 63 virtual void OnPaint(const std::vector<pp::Rect>& paint_rects, |
| 64 std::vector<PaintManager::ReadyRect>* ready, | 64 std::vector<PaintManager::ReadyRect>* ready, |
| 65 std::vector<pp::Rect>* pending) OVERRIDE; | 65 std::vector<pp::Rect>* pending) override; |
| 66 | 66 |
| 67 // pp::Printing_Dev implementation. | 67 // pp::Printing_Dev implementation. |
| 68 virtual uint32_t QuerySupportedPrintOutputFormats() OVERRIDE; | 68 virtual uint32_t QuerySupportedPrintOutputFormats() override; |
| 69 virtual int32_t PrintBegin( | 69 virtual int32_t PrintBegin( |
| 70 const PP_PrintSettings_Dev& print_settings) OVERRIDE; | 70 const PP_PrintSettings_Dev& print_settings) override; |
| 71 virtual pp::Resource PrintPages( | 71 virtual pp::Resource PrintPages( |
| 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 virtual void PrintEnd() OVERRIDE; | 74 virtual void PrintEnd() override; |
| 75 virtual bool IsPrintScalingDisabled() OVERRIDE; | 75 virtual bool IsPrintScalingDisabled() override; |
| 76 | 76 |
| 77 // pp::Private implementation. | 77 // pp::Private implementation. |
| 78 virtual pp::Var GetLinkAtPosition(const pp::Point& point); | 78 virtual pp::Var GetLinkAtPosition(const pp::Point& point); |
| 79 | 79 |
| 80 // PPP_Selection_Dev implementation. | 80 // PPP_Selection_Dev implementation. |
| 81 virtual pp::Var GetSelectedText(bool html) OVERRIDE; | 81 virtual pp::Var GetSelectedText(bool html) override; |
| 82 | 82 |
| 83 void FlushCallback(int32_t result); | 83 void FlushCallback(int32_t result); |
| 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); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual void DocumentPaintOccurred(); | 128 virtual void DocumentPaintOccurred(); |
| 129 virtual void DocumentLoadComplete(int page_count); | 129 virtual void DocumentLoadComplete(int page_count); |
| 130 virtual void DocumentLoadFailed(); | 130 virtual void DocumentLoadFailed(); |
| 131 virtual pp::Instance* GetPluginInstance(); | 131 virtual pp::Instance* GetPluginInstance(); |
| 132 virtual void DocumentHasUnsupportedFeature(const std::string& feature); | 132 virtual void DocumentHasUnsupportedFeature(const std::string& feature); |
| 133 virtual void DocumentLoadProgress(uint32 available, uint32 doc_size); | 133 virtual void DocumentLoadProgress(uint32 available, uint32 doc_size); |
| 134 virtual void FormTextFieldFocusChange(bool in_focus); | 134 virtual void FormTextFieldFocusChange(bool in_focus); |
| 135 virtual bool IsPrintPreview(); | 135 virtual bool IsPrintPreview(); |
| 136 | 136 |
| 137 // PreviewModeClient::Client implementation. | 137 // PreviewModeClient::Client implementation. |
| 138 virtual void PreviewDocumentLoadComplete() OVERRIDE; | 138 virtual void PreviewDocumentLoadComplete() override; |
| 139 virtual void PreviewDocumentLoadFailed() OVERRIDE; | 139 virtual 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // zooming the plugin so that flickering doesn't occur while zooming. | 336 // zooming the plugin so that flickering doesn't occur while zooming. |
| 337 bool stop_scrolling_; | 337 bool stop_scrolling_; |
| 338 | 338 |
| 339 // The callback for receiving the password from the page. | 339 // The callback for receiving the password from the page. |
| 340 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; | 340 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; |
| 341 }; | 341 }; |
| 342 | 342 |
| 343 } // namespace chrome_pdf | 343 } // namespace chrome_pdf |
| 344 | 344 |
| 345 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 345 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| OLD | NEW |