| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class MouseEvent; | 53 class MouseEvent; |
| 54 class ResourceError; | 54 class ResourceError; |
| 55 class ResourceResponse; | 55 class ResourceResponse; |
| 56 class ScrollbarGroup; | 56 class ScrollbarGroup; |
| 57 class TouchEvent; | 57 class TouchEvent; |
| 58 class WebPlugin; | 58 class WebPlugin; |
| 59 class WebPluginLoadObserver; | 59 class WebPluginLoadObserver; |
| 60 class WheelEvent; | 60 class WheelEvent; |
| 61 class Widget; | 61 class Widget; |
| 62 struct WebPrintParams; | 62 struct WebPrintParams; |
| 63 struct WebPrintPresetOptions; |
| 63 | 64 |
| 64 class WebPluginContainerImpl final : public PluginView, public WebPluginContaine
r, public FrameDestructionObserver { | 65 class WebPluginContainerImpl final : public PluginView, public WebPluginContaine
r, public FrameDestructionObserver { |
| 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebPluginContainerImpl); | 66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebPluginContainerImpl); |
| 66 public: | 67 public: |
| 67 static PassRefPtrWillBeRawPtr<WebPluginContainerImpl> create(HTMLPlugInEleme
nt* element, WebPlugin* webPlugin) | 68 static PassRefPtrWillBeRawPtr<WebPluginContainerImpl> create(HTMLPlugInEleme
nt* element, WebPlugin* webPlugin) |
| 68 { | 69 { |
| 69 return adoptRefWillBeNoop(new WebPluginContainerImpl(element, webPlugin)
); | 70 return adoptRefWillBeNoop(new WebPluginContainerImpl(element, webPlugin)
); |
| 70 } | 71 } |
| 71 | 72 |
| 72 // PluginView methods | 73 // PluginView methods |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 virtual void setWebLayer(WebLayer*); | 125 virtual void setWebLayer(WebLayer*); |
| 125 | 126 |
| 126 // Printing interface. The plugin can support custom printing | 127 // Printing interface. The plugin can support custom printing |
| 127 // (which means it controls the layout, number of pages etc). | 128 // (which means it controls the layout, number of pages etc). |
| 128 // Whether the plugin supports its own paginated print. The other print | 129 // Whether the plugin supports its own paginated print. The other print |
| 129 // interface methods are called only if this method returns true. | 130 // interface methods are called only if this method returns true. |
| 130 bool supportsPaginatedPrint() const; | 131 bool supportsPaginatedPrint() const; |
| 131 // If the plugin content should not be scaled to the printable area of | 132 // If the plugin content should not be scaled to the printable area of |
| 132 // the page, then this method should return true. | 133 // the page, then this method should return true. |
| 133 bool isPrintScalingDisabled() const; | 134 bool isPrintScalingDisabled() const; |
| 134 // Returns number of copies to be printed. | 135 // Returns true on success and sets the out parameter to the print preset op
tions for the document. |
| 135 int getCopiesToPrint() const; | 136 bool getPrintPresetOptionsFromDocument(WebPrintPresetOptions*) const; |
| 136 // Sets up printing at the specified WebPrintParams. Returns the number of p
ages to be printed at these settings. | 137 // Sets up printing at the specified WebPrintParams. Returns the number of p
ages to be printed at these settings. |
| 137 int printBegin(const WebPrintParams&) const; | 138 int printBegin(const WebPrintParams&) const; |
| 138 // Prints the page specified by pageNumber (0-based index) into the supplied
canvas. | 139 // Prints the page specified by pageNumber (0-based index) into the supplied
canvas. |
| 139 bool printPage(int pageNumber, GraphicsContext*); | 140 bool printPage(int pageNumber, GraphicsContext*); |
| 140 // Ends the print operation. | 141 // Ends the print operation. |
| 141 void printEnd(); | 142 void printEnd(); |
| 142 | 143 |
| 143 // Copy the selected text. | 144 // Copy the selected text. |
| 144 void copy(); | 145 void copy(); |
| 145 | 146 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 }; | 217 }; |
| 217 | 218 |
| 218 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai
ner(), widget.isPluginContainer()); | 219 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai
ner(), widget.isPluginContainer()); |
| 219 // Unlike Widget, we need not worry about object type for container. | 220 // Unlike Widget, we need not worry about object type for container. |
| 220 // WebPluginContainerImpl is the only subclass of WebPluginContainer. | 221 // WebPluginContainerImpl is the only subclass of WebPluginContainer. |
| 221 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t
rue); | 222 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t
rue); |
| 222 | 223 |
| 223 } // namespace blink | 224 } // namespace blink |
| 224 | 225 |
| 225 #endif | 226 #endif |
| OLD | NEW |