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

Side by Side Diff: ppapi/shared_impl/ppp_instance_combined.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 8 years, 11 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_
6 #define PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_ 6 #define PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ppapi/c/ppp_instance.h" 9 #include "ppapi/c/ppp_instance.h"
10 #include "ppapi/shared_impl/ppapi_shared_export.h" 10 #include "ppapi/shared_impl/ppapi_shared_export.h"
11 11
12 namespace ppapi { 12 namespace ppapi {
13 13
14 struct PPAPI_SHARED_EXPORT PPP_Instance_Combined : public PPP_Instance_1_0 { 14 // This exposes the 1.1 interface and forwards it to the 1.0 interface is
15 // necessary.
16 struct PPAPI_SHARED_EXPORT PPP_Instance_Combined {
15 public: 17 public:
16 explicit PPP_Instance_Combined(const PPP_Instance_1_0& instance_if); 18 explicit PPP_Instance_Combined(const PPP_Instance_1_0& instance_if);
19 explicit PPP_Instance_Combined(const PPP_Instance_1_1& instance_if);
20
21 PP_Bool DidCreate(PP_Instance instance,
22 uint32_t argc,
23 const char* argn[],
24 const char* argv[]);
25 void DidDestroy(PP_Instance instance);
26
27 // This version of DidChangeView encapsulates all arguments for both 1.0
28 // and 1.1 versions of this function. Conversion from 1.1 -> 1.0 is easy,
29 // but this class doesn't have the necessary context (resource interfaces)
30 // to do the conversion, so the caller must do it.
31 void DidChangeView(PP_Instance instance,
32 PP_Resource view_changed_resource,
33 const struct PP_Rect* position,
34 const struct PP_Rect* clip);
35
36 void DidChangeFocus(PP_Instance instance, PP_Bool has_focus);
37 PP_Bool HandleDocumentLoad(PP_Instance instance, PP_Resource url_loader);
38
39 private:
40 // For version 1.0, DidChangeView will be NULL, and DidChangeView_1_0 will
41 // be set below.
42 PPP_Instance_1_1 instance_1_1_;
43
44 // Non-NULL when Instance 1.0 is used.
45 void (*did_change_view_1_0_)(PP_Instance instance,
46 const struct PP_Rect* position,
47 const struct PP_Rect* clip);
17 48
18 DISALLOW_COPY_AND_ASSIGN(PPP_Instance_Combined); 49 DISALLOW_COPY_AND_ASSIGN(PPP_Instance_Combined);
19 }; 50 };
20 51
21 } // namespace ppapi 52 } // namespace ppapi
22 53
23 #endif // PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_ 54 #endif // PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_
24 55
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698