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

Unified Diff: o3d/gpu_plugin/gpu_plugin_object.h

Issue 344001: GPUPluginObject has methods to query its current window size.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | o3d/gpu_plugin/gpu_plugin_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: o3d/gpu_plugin/gpu_plugin_object.h
===================================================================
--- o3d/gpu_plugin/gpu_plugin_object.h (revision 30114)
+++ o3d/gpu_plugin/gpu_plugin_object.h (working copy)
@@ -67,6 +67,26 @@
return status_;
}
+ // Get the width of the plugin window.
+ int32 GetWidth() {
+ return window_.width;
+ }
+
+ // Get the height of the plugin window.
+ int32 GetHeight() {
+ return window_.height;
+ }
+
+ // Set the object that receives notifications of GPU plugin object events
+ // such as resize and keyboard and mouse input.
+ void SetEventSync(NPObjectPointer<NPObject> event_sync) {
+ event_sync_ = event_sync;
+ }
+
+ NPObjectPointer<NPObject> GetEventSync() {
+ return event_sync_;
+ }
+
// Initializes and returns the command buffer object. Returns NULL if the
// command buffer cannot be initialized, for example if the plugin does not
// yet have a window handle.
@@ -90,6 +110,10 @@
NP_UTILS_BEGIN_DISPATCHER_CHAIN(GPUPluginObject, DefaultNPObject<NPObject>)
NP_UTILS_DISPATCHER(GetStatus, int32());
+ NP_UTILS_DISPATCHER(GetWidth, int32());
+ NP_UTILS_DISPATCHER(GetHeight, int32());
+ NP_UTILS_DISPATCHER(SetEventSync, void(NPObjectPointer<NPObject> sync));
+ NP_UTILS_DISPATCHER(GetEventSync, NPObjectPointer<NPObject>());
NP_UTILS_DISPATCHER(OpenCommandBuffer, NPObjectPointer<NPObject>())
NP_UTILS_END_DISPATCHER_CHAIN
@@ -101,6 +125,7 @@
NPWindow window_;
NPObjectPointer<CommandBuffer> command_buffer_;
scoped_refptr<GPUProcessor> processor_;
+ NPObjectPointer<NPObject> event_sync_;
};
} // namespace gpu_plugin
« no previous file with comments | « no previous file | o3d/gpu_plugin/gpu_plugin_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698