OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void cancelFullscreen() override; | 137 void cancelFullscreen() override; |
138 | 138 |
139 // Printing interface. The plugin can support custom printing | 139 // Printing interface. The plugin can support custom printing |
140 // (which means it controls the layout, number of pages etc). | 140 // (which means it controls the layout, number of pages etc). |
141 // Whether the plugin supports its own paginated print. The other print | 141 // Whether the plugin supports its own paginated print. The other print |
142 // interface methods are called only if this method returns true. | 142 // interface methods are called only if this method returns true. |
143 bool supportsPaginatedPrint() const; | 143 bool supportsPaginatedPrint() const; |
144 // If the plugin content should not be scaled to the printable area of | 144 // If the plugin content should not be scaled to the printable area of |
145 // the page, then this method should return true. | 145 // the page, then this method should return true. |
146 bool isPrintScalingDisabled() const; | 146 bool isPrintScalingDisabled() const; |
147 // Returns true on success and sets the out parameter to the print preset opti
ons for the document. | 147 // Returns true on success and sets the out parameter to the print preset |
| 148 // options for the document. |
148 bool getPrintPresetOptionsFromDocument(WebPrintPresetOptions*) const; | 149 bool getPrintPresetOptionsFromDocument(WebPrintPresetOptions*) const; |
149 // Sets up printing at the specified WebPrintParams. Returns the number of pag
es to be printed at these settings. | 150 // Sets up printing at the specified WebPrintParams. Returns the number of |
| 151 // pages to be printed at these settings. |
150 int printBegin(const WebPrintParams&) const; | 152 int printBegin(const WebPrintParams&) const; |
151 // Prints the page specified by pageNumber (0-based index) into the supplied c
anvas. | 153 // Prints the page specified by pageNumber (0-based index) into the supplied |
| 154 // canvas. |
152 void printPage(int pageNumber, GraphicsContext&, const IntRect& paintRect); | 155 void printPage(int pageNumber, GraphicsContext&, const IntRect& paintRect); |
153 // Ends the print operation. | 156 // Ends the print operation. |
154 void printEnd(); | 157 void printEnd(); |
155 | 158 |
156 // Copy the selected text. | 159 // Copy the selected text. |
157 void copy(); | 160 void copy(); |
158 | 161 |
159 // Pass the edit command to the plugin. | 162 // Pass the edit command to the plugin. |
160 bool executeEditCommand(const WebString& name); | 163 bool executeEditCommand(const WebString& name); |
161 bool executeEditCommand(const WebString& name, const WebString& value); | 164 bool executeEditCommand(const WebString& name, const WebString& value); |
162 | 165 |
163 // Resource load events for the plugin's source data: | 166 // Resource load events for the plugin's source data: |
164 void didReceiveResponse(const ResourceResponse&) override; | 167 void didReceiveResponse(const ResourceResponse&) override; |
165 void didReceiveData(const char* data, int dataLength) override; | 168 void didReceiveData(const char* data, int dataLength) override; |
166 void didFinishLoading(); | 169 void didFinishLoading(); |
167 void didFailLoading(const ResourceError&); | 170 void didFailLoading(const ResourceError&); |
168 | 171 |
169 DECLARE_VIRTUAL_TRACE(); | 172 DECLARE_VIRTUAL_TRACE(); |
170 void dispose() override; | 173 void dispose() override; |
171 | 174 |
172 private: | 175 private: |
173 // Sets |windowRect| to the content rect of the plugin in screen space. | 176 // Sets |windowRect| to the content rect of the plugin in screen space. |
174 // Sets |clippedAbsoluteRect| to the visible rect for the plugin, clipped to t
he visible screen of the root frame, in local space of the plugin. | 177 // Sets |clippedAbsoluteRect| to the visible rect for the plugin, clipped to |
175 // Sets |unclippedAbsoluteRect| to the visible rect for the plugin (but withou
t also clipping to the screen), in local space of the plugin. | 178 // the visible screen of the root frame, in local space of the plugin. |
| 179 // Sets |unclippedAbsoluteRect| to the visible rect for the plugin (but |
| 180 // without also clipping to the screen), in local space of the plugin. |
176 void computeClipRectsForPlugin( | 181 void computeClipRectsForPlugin( |
177 const HTMLFrameOwnerElement* pluginOwnerElement, | 182 const HTMLFrameOwnerElement* pluginOwnerElement, |
178 IntRect& windowRect, | 183 IntRect& windowRect, |
179 IntRect& clippedLocalRect, | 184 IntRect& clippedLocalRect, |
180 IntRect& unclippedIntLocalRect) const; | 185 IntRect& unclippedIntLocalRect) const; |
181 | 186 |
182 WebPluginContainerImpl(HTMLPlugInElement*, WebPlugin*); | 187 WebPluginContainerImpl(HTMLPlugInElement*, WebPlugin*); |
183 ~WebPluginContainerImpl() override; | 188 ~WebPluginContainerImpl() override; |
184 | 189 |
185 void handleMouseEvent(MouseEvent*); | 190 void handleMouseEvent(MouseEvent*); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // WebPluginContainerImpl is the only subclass of WebPluginContainer. | 231 // WebPluginContainerImpl is the only subclass of WebPluginContainer. |
227 DEFINE_TYPE_CASTS(WebPluginContainerImpl, | 232 DEFINE_TYPE_CASTS(WebPluginContainerImpl, |
228 WebPluginContainer, | 233 WebPluginContainer, |
229 container, | 234 container, |
230 true, | 235 true, |
231 true); | 236 true); |
232 | 237 |
233 } // namespace blink | 238 } // namespace blink |
234 | 239 |
235 #endif | 240 #endif |
OLD | NEW |