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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_instance_data.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: new patch 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * 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 #include "ppapi/native_client/src/shared/ppapi_proxy/view_data.h"
13 14
14 namespace ppapi_proxy { 15 namespace ppapi_proxy {
15 16
16 // Per-instance data on the plugin side. 17 // Per-instance data on the plugin side.
17 class PluginInstanceData { 18 class PluginInstanceData {
18 public: 19 public:
19 static PluginInstanceData* FromPP(PP_Instance id); 20 static PluginInstanceData* FromPP(PP_Instance id);
20 static void DidCreate(PP_Instance id); 21 static void DidCreate(PP_Instance id);
21 static void DidDestroy(PP_Instance id); 22 static void DidDestroy(PP_Instance id);
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 static bool IsFullscreen(PP_Instance id);
25 24
26 PluginInstanceData(PP_Instance id) 25 PluginInstanceData(PP_Instance id)
27 : id_(id), position_(PP_MakeRectFromXYWH(0, 0, 0, 0)) { 26 : id_(id),
27 sent_view_changed_(false) {
28 } 28 }
29 ~PluginInstanceData() {} 29 ~PluginInstanceData() {}
30 30
31 PP_Instance id() { return id_; } 31 PP_Instance id() { return id_; }
32 PP_Rect position() { return position_; } 32
33 bool is_fullscreen() { return is_fullscreen_; } 33 void set_sent_view_changed() { sent_view_changed_ = true; }
34 bool sent_view_changed() const { return sent_view_changed_; }
35
36 void set_last_view_data(const ViewData& data) { last_view_data_ = data; }
37 const ViewData& last_view_data() const { return last_view_data_; }
34 38
35 private: 39 private:
36 NACL_DISALLOW_COPY_AND_ASSIGN(PluginInstanceData); 40 NACL_DISALLOW_COPY_AND_ASSIGN(PluginInstanceData);
37 41
38 PP_Instance id_; 42 PP_Instance id_;
39 PP_Rect position_; 43 bool sent_view_changed_;
40 bool is_fullscreen_; 44
45 ViewData last_view_data_;
41 }; 46 };
42 47
43 } // namespace ppapi_proxy 48 } // namespace ppapi_proxy
44 49
45 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_ 50 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_INSTANCE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698