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

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

Issue 8351023: PPAPI NaCl Proxy: optimize PPB_Fullscreen::IsFullscreen. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 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 #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 27 matching lines...) Expand all
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, 46 void PluginInstanceData::DidChangeView(PP_Instance id,
47 PP_Rect position, 47 PP_Rect position,
48 PP_Rect clip) { 48 PP_Rect clip,
49 bool is_fullscreen) {
49 PluginInstanceData* instance = FromPP(id); 50 PluginInstanceData* instance = FromPP(id);
50 if (instance) { 51 if (instance) {
51 instance->set_position(position); 52 instance->position_ = position;
53 instance->is_fullscreen_ = is_fullscreen;
52 } 54 }
53 } 55 }
54 56
57 // static
58 bool PluginInstanceData::IsFullscreen(PP_Instance id) {
59 PluginInstanceData* instance = FromPP(id);
60 if (instance)
61 return instance->is_fullscreen_;
62 return false;
63 }
64
55 } // namespace ppapi_proxy 65 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698