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

Side by Side Diff: Source/WebKit/chromium/public/WebPlugin.h

Issue 15071004: Plumb edit commands to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Alternative approach that gives plugin chance to override Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 virtual WebPluginContainer* container() const { return 0; } 63 virtual WebPluginContainer* container() const { return 0; }
64 64
65 virtual NPObject* scriptableObject() = 0; 65 virtual NPObject* scriptableObject() = 0;
66 66
67 // Returns true if the form submission value is successfully obtained 67 // Returns true if the form submission value is successfully obtained
68 // from the plugin. The value would be associated with the name attribute 68 // from the plugin. The value would be associated with the name attribute
69 // of the corresponding object element. 69 // of the corresponding object element.
70 virtual bool getFormValue(WebString&) { return false; } 70 virtual bool getFormValue(WebString&) { return false; }
71 virtual bool supportsKeyboardFocus() const { return false; } 71 virtual bool supportsKeyboardFocus() const { return false; }
72 virtual bool supportsEditCommands() const { return false; }
72 73
73 virtual bool canProcessDrag() const { return false; } 74 virtual bool canProcessDrag() const { return false; }
74 75
75 virtual void paint(WebCanvas*, const WebRect&) = 0; 76 virtual void paint(WebCanvas*, const WebRect&) = 0;
76 77
77 // Coordinates are relative to the containing window. 78 // Coordinates are relative to the containing window.
78 virtual void updateGeometry( 79 virtual void updateGeometry(
79 const WebRect& frameRect, const WebRect& clipRect, 80 const WebRect& frameRect, const WebRect& clipRect,
80 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; 81 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0;
81 82
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Prints the page specified by pageNumber (0-based index) into the supplied canvas. 114 // Prints the page specified by pageNumber (0-based index) into the supplied canvas.
114 virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; } 115 virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; }
115 // Ends the print operation. 116 // Ends the print operation.
116 virtual void printEnd() { } 117 virtual void printEnd() { }
117 118
118 virtual bool hasSelection() const { return false; } 119 virtual bool hasSelection() const { return false; }
119 virtual WebString selectionAsText() const { return WebString(); } 120 virtual WebString selectionAsText() const { return WebString(); }
120 virtual WebString selectionAsMarkup() const { return WebString(); } 121 virtual WebString selectionAsMarkup() const { return WebString(); }
121 122
122 virtual bool executeEditCommand(const WebString& name) { return false; } 123 virtual bool executeEditCommand(const WebString& name) { return false; }
124 virtual bool executeEditCommand(const WebString& name, const WebString& valu e) { return false; }
123 125
124 // If the given position is over a link, returns the absolute url. 126 // If the given position is over a link, returns the absolute url.
125 // Otherwise an empty url is returned. 127 // Otherwise an empty url is returned.
126 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR L(); } 128 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR L(); }
127 129
128 // Used for zooming of full page plugins. 130 // Used for zooming of full page plugins.
129 virtual void setZoomLevel(double level, bool textOnly) { } 131 virtual void setZoomLevel(double level, bool textOnly) { }
130 132
131 // Find interface. 133 // Find interface.
132 // Start a new search. The plugin should search for a little bit at a time so that it 134 // Start a new search. The plugin should search for a little bit at a time so that it
(...skipping 18 matching lines...) Expand all
151 153
152 virtual bool isPlaceholder() { return true; } 154 virtual bool isPlaceholder() { return true; }
153 155
154 protected: 156 protected:
155 ~WebPlugin() { } 157 ~WebPlugin() { }
156 }; 158 };
157 159
158 } // namespace WebKit 160 } // namespace WebKit
159 161
160 #endif 162 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698