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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_instance_data.h

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * Copyright 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file.
5 */
6
7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_
8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_
9
10 #include "native_client/src/include/nacl_macros.h"
11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_rect.h"
13
14 namespace ppapi_proxy {
15
16 // Per-instance data on the plugin side.
17 class PluginInstanceData {
18 public:
19 static PluginInstanceData* FromPP(PP_Instance id);
20 static void DidCreate(PP_Instance id);
21 static void DidDestroy(PP_Instance id);
22 static void DidChangeView(PP_Instance id, PP_Rect position, PP_Rect clip);
23
24 PluginInstanceData(PP_Instance id)
25 : id_(id), position_(PP_MakeRectFromXYWH(0, 0, 0, 0)) {
26 }
27 ~PluginInstanceData() {}
28
29 PP_Instance id() { return id_; }
30 PP_Rect position() { return position_; }
31 void set_position(PP_Rect position) { position_ = position; }
32
33 private:
34 NACL_DISALLOW_COPY_AND_ASSIGN(PluginInstanceData);
35
36 PP_Instance id_;
37 PP_Rect position_;
38 };
39
40 } // namespace ppapi_proxy
41
42 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698