| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |