Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: Source/web/WebPluginContainerImpl.h

Issue 591053002: Support print preset options for pdf document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review feedback (comment, initialization) Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class ResourceError; 55 class ResourceError;
56 class ResourceResponse; 56 class ResourceResponse;
57 class ScrollbarGroup; 57 class ScrollbarGroup;
58 class TouchEvent; 58 class TouchEvent;
59 class WebPlugin; 59 class WebPlugin;
60 class WebPluginLoadObserver; 60 class WebPluginLoadObserver;
61 class WebExternalTextureLayer; 61 class WebExternalTextureLayer;
62 class WheelEvent; 62 class WheelEvent;
63 class Widget; 63 class Widget;
64 struct WebPrintParams; 64 struct WebPrintParams;
65 struct WebPrintPresetOptions;
65 66
66 class WebPluginContainerImpl final 67 class WebPluginContainerImpl final
67 : public PluginView 68 : public PluginView
68 , public WebPluginContainer 69 , public WebPluginContainer
69 #if !ENABLE(OILPAN) 70 #if !ENABLE(OILPAN)
70 , public FrameDestructionObserver 71 , public FrameDestructionObserver
71 #endif 72 #endif
72 { 73 {
73 public: 74 public:
74 static PassRefPtr<WebPluginContainerImpl> create(HTMLPlugInElement* element, WebPlugin* webPlugin) 75 static PassRefPtr<WebPluginContainerImpl> create(HTMLPlugInElement* element, WebPlugin* webPlugin)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual void setWebLayer(WebLayer*); 132 virtual void setWebLayer(WebLayer*);
132 133
133 // Printing interface. The plugin can support custom printing 134 // Printing interface. The plugin can support custom printing
134 // (which means it controls the layout, number of pages etc). 135 // (which means it controls the layout, number of pages etc).
135 // Whether the plugin supports its own paginated print. The other print 136 // Whether the plugin supports its own paginated print. The other print
136 // interface methods are called only if this method returns true. 137 // interface methods are called only if this method returns true.
137 bool supportsPaginatedPrint() const; 138 bool supportsPaginatedPrint() const;
138 // If the plugin content should not be scaled to the printable area of 139 // If the plugin content should not be scaled to the printable area of
139 // the page, then this method should return true. 140 // the page, then this method should return true.
140 bool isPrintScalingDisabled() const; 141 bool isPrintScalingDisabled() const;
141 // Returns number of copies to be printed. 142 // Returns true on success and sets the out parameter to the print preset op tions for the document.
142 int getCopiesToPrint() const; 143 bool getPrintPresetOptionsFromDocument(WebPrintPresetOptions*) const;
143 // Sets up printing at the specified WebPrintParams. Returns the number of p ages to be printed at these settings. 144 // Sets up printing at the specified WebPrintParams. Returns the number of p ages to be printed at these settings.
144 int printBegin(const WebPrintParams&) const; 145 int printBegin(const WebPrintParams&) const;
145 // Prints the page specified by pageNumber (0-based index) into the supplied canvas. 146 // Prints the page specified by pageNumber (0-based index) into the supplied canvas.
146 bool printPage(int pageNumber, GraphicsContext*); 147 bool printPage(int pageNumber, GraphicsContext*);
147 // Ends the print operation. 148 // Ends the print operation.
148 void printEnd(); 149 void printEnd();
149 150
150 // Copy the selected text. 151 // Copy the selected text.
151 void copy(); 152 void copy();
152 153
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 }; 232 };
232 233
233 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai ner(), widget.isPluginContainer()); 234 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai ner(), widget.isPluginContainer());
234 // Unlike Widget, we need not worry about object type for container. 235 // Unlike Widget, we need not worry about object type for container.
235 // WebPluginContainerImpl is the only subclass of WebPluginContainer. 236 // WebPluginContainerImpl is the only subclass of WebPluginContainer.
236 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue); 237 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue);
237 238
238 } // namespace blink 239 } // namespace blink
239 240
240 #endif 241 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698