Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2011 The Chromium Authors. All rights reserved. | 2 * Copyright 2011 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ | 7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ |
| 8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ | 8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ |
| 9 | 9 |
| 10 #include "native_client/src/include/nacl_macros.h" | 10 #include "native_client/src/include/nacl_macros.h" |
| 11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_rect.h" | 12 #include "ppapi/c/pp_rect.h" |
| 13 | 13 |
| 14 namespace ppapi_proxy { | 14 namespace ppapi_proxy { |
| 15 | 15 |
| 16 // Per-instance data on the plugin side. | 16 // Per-instance data on the plugin side. |
| 17 class PluginInstanceData { | 17 class PluginInstanceData { |
| 18 public: | 18 public: |
| 19 static PluginInstanceData* FromPP(PP_Instance id); | 19 static PluginInstanceData* FromPP(PP_Instance id); |
| 20 static void DidCreate(PP_Instance id); | 20 static void DidCreate(PP_Instance id); |
| 21 static void DidDestroy(PP_Instance id); | 21 static void DidDestroy(PP_Instance id); |
| 22 static void DidChangeView(PP_Instance id, PP_Rect position, PP_Rect clip); | 22 static void DidChangeView(PP_Instance id, PP_Rect position, PP_Rect clip, |
| 23 bool is_fullscreen); | |
| 24 static bool IsFullscreen(PP_Instance id); | |
| 23 | 25 |
| 24 PluginInstanceData(PP_Instance id) | 26 PluginInstanceData(PP_Instance id) |
| 25 : id_(id), position_(PP_MakeRectFromXYWH(0, 0, 0, 0)) { | 27 : id_(id), position_(PP_MakeRectFromXYWH(0, 0, 0, 0)) { |
| 26 } | 28 } |
| 27 ~PluginInstanceData() {} | 29 ~PluginInstanceData() {} |
| 28 | 30 |
| 29 PP_Instance id() { return id_; } | 31 PP_Instance id() { return id_; } |
| 30 PP_Rect position() { return position_; } | 32 PP_Rect position() { return position_; } |
| 31 void set_position(PP_Rect position) { position_ = position; } | 33 void set_position(PP_Rect position) { position_ = position; } |
| 34 bool is_fullscreen() { return is_fullscreen_; } | |
| 35 void set_is_fullscreen(bool value) { is_fullscreen_ = value; } | |
|
bbudge
2011/10/25 17:11:46
It looks like this (and set_position) should only
polina
2011/10/25 18:52:19
Done.
| |
| 32 | 36 |
| 33 private: | 37 private: |
| 34 NACL_DISALLOW_COPY_AND_ASSIGN(PluginInstanceData); | 38 NACL_DISALLOW_COPY_AND_ASSIGN(PluginInstanceData); |
| 35 | 39 |
| 36 PP_Instance id_; | 40 PP_Instance id_; |
| 37 PP_Rect position_; | 41 PP_Rect position_; |
| 42 bool is_fullscreen_; | |
| 38 }; | 43 }; |
| 39 | 44 |
| 40 } // namespace ppapi_proxy | 45 } // namespace ppapi_proxy |
| 41 | 46 |
| 42 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ | 47 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ |
| OLD | NEW |