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

Unified Diff: plugin/idl/client.idl

Issue 164130: This CL adds client.toDataURL which gets the contents... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/win/d3d9/renderer_d3d9.cc ('k') | tests/build.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: plugin/idl/client.idl
===================================================================
--- plugin/idl/client.idl (revision 22687)
+++ plugin/idl/client.idl (working copy)
@@ -475,13 +475,23 @@
void InvalidateAllParameters();
%[
- This function is only available in the test version of the plugin.
- \param file_name Name to save screenshot to.
- \return True on success.
+ Gets a copy of the current backbuffer of O3D as a data: url.
+
+ NOTE: Calling it will cause a render to happen.
+
+ \return A Data URL for the backbuffer.
%]
- bool SaveScreen(String file_name);
+ String ToDataURL();
%[
+ Gets a copy of the current backbuffer of O3D as a data: url.
+ \param mime_type The type of data url you want. Currently O3D only supports
+ image/png. See HTML5 canvas tag for info about toDataURL.
+ \return A Data URL for the backbuffer.
+ %]
+ [userglue] String ToDataURL(String mime_type);
+
+ %[
Returns the status of initializing the renderer so we can display the
appropriate message. We require a certain minimum set of graphics
capabilities. If the user's computer does not have his minimum
@@ -574,6 +584,12 @@
&modes);
return modes;
}
+ o3d::String userglue_method_ToDataURL(o3d::Client* self,
+ const o3d::String& mime_type) {
+ // We ignore the mime_type since it's only a suggestion
+ // and we only return the required image/png type.
+ return self->ToDataURL();
+ }
void userglue_method_SetFullscreenClickRegion(
void *plugin_data, o3d::Client *self, int x, int y, int width,
int height, int mode_id) {
« no previous file with comments | « core/win/d3d9/renderer_d3d9.cc ('k') | tests/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698