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

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

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 #include "native_client/src/shared/ppapi_proxy/plugin_instance_data.h" 7 #include "native_client/src/shared/ppapi_proxy/plugin_instance_data.h"
8 8
9 #include <tr1/unordered_map> 9 #include <tr1/unordered_map>
10 10
(...skipping 25 matching lines...) Expand all
36 // CHECK(map.end() == map.find(id)); 36 // CHECK(map.end() == map.find(id));
37 map[id] = new PluginInstanceData(id); 37 map[id] = new PluginInstanceData(id);
38 } 38 }
39 39
40 // static 40 // static
41 void PluginInstanceData::DidDestroy(PP_Instance id) { 41 void PluginInstanceData::DidDestroy(PP_Instance id) {
42 GetInstanceMap().erase(id); 42 GetInstanceMap().erase(id);
43 } 43 }
44 44
45 // static 45 // static
46 void PluginInstanceData::DidChangeView(PP_Instance id,
47 PP_Rect position,
48 PP_Rect clip,
49 bool is_fullscreen) {
50 PluginInstanceData* instance = FromPP(id);
51 if (instance) {
52 instance->position_ = position;
53 instance->is_fullscreen_ = is_fullscreen;
54 }
55 }
56
57 // static
58 bool PluginInstanceData::IsFullscreen(PP_Instance id) { 46 bool PluginInstanceData::IsFullscreen(PP_Instance id) {
59 PluginInstanceData* instance = FromPP(id); 47 PluginInstanceData* instance = FromPP(id);
60 if (instance) 48 if (instance)
61 return instance->is_fullscreen_; 49 return instance->last_view_data_.is_fullscreen;
62 return false; 50 return false;
63 } 51 }
64 52
65 } // namespace ppapi_proxy 53 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698