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

Unified Diff: ppapi/cpp/instance.h

Issue 8951014: Change the DidChangeView update to take a new ViewChanged resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More nacl fixes Created 9 years 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
Index: ppapi/cpp/instance.h
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h
index 9a3bfafa85b6912f374d292f33f5d00d8b0d32f2..fff23cb24c02b2e8eabe08fda048a7e0459f175c 100644
--- a/ppapi/cpp/instance.h
+++ b/ppapi/cpp/instance.h
@@ -14,6 +14,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#include "ppapi/cpp/view.h"
struct PP_InputEvent;
@@ -90,9 +91,23 @@ class Instance {
/// @{
/// @name PPP_Instance methods for the module to override:
- /// DidChangeView() is called when the position, the size, or the clip
- /// rectangle of the element in the browser that corresponds to this
- /// instance has changed.
+ /// DidChangeView() is called when the view information for the Instance
+ /// has changed. See the <code>View</code> object for information.
+ ///
+ /// Most implementations will want to check if the size and user visibility
+ /// changed, and either resize themselves or start/stop generating updates.
+ ///
+ /// You should not call the default implementation. For
+ /// backwards-compatibility, it will call the deprecated version of
+ /// DidChangeView below.
+ virtual void DidChangeView(const View& view);
+
+ /// Deprecated backwards-compatible version of <code>DidChangeView()</code>.
+ /// New code should derive from the version that takes a
+ /// <code>ViewChanged</code> object rather than this version. This function
+ /// is called by the default implementation of the newer
+ /// <code>DidChangeView</code> function for source compatibility with older
+ /// code.
///
/// A typical implementation will check the size of the <code>position</code>
/// argument and reallocate the graphics context when a different size is
« ppapi/api/ppp_instance.idl ('K') | « ppapi/c/ppp_instance.h ('k') | ppapi/cpp/instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698