OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can |
| 3 // be found in the LICENSE file. |
| 4 |
| 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_ |
| 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_ |
| 7 |
| 8 #include "native_client/src/include/nacl_macros.h" |
| 9 #include "native_client/src/shared/ppapi_proxy/view_data.h" |
| 10 #include "native_client/src/shared/ppapi_proxy/plugin_resource.h" |
| 11 #include "ppapi/c/ppb_view.h" |
| 12 |
| 13 namespace ppapi_proxy { |
| 14 |
| 15 // Implements the untrusted side of the PPB_View interface. |
| 16 class PluginView : public PluginResource { |
| 17 public: |
| 18 PluginView(); |
| 19 void Init(const ViewData& view_data); |
| 20 virtual ~PluginView(); |
| 21 |
| 22 // PluginResource implementation. |
| 23 virtual bool InitFromBrowserResource(PP_Resource /*resource*/) { |
| 24 return true; |
| 25 } |
| 26 |
| 27 const ViewData& view_data() const { return view_data_; } |
| 28 |
| 29 static const PPB_View* GetInterface(); |
| 30 |
| 31 private: |
| 32 IMPLEMENT_RESOURCE(PluginView); |
| 33 NACL_DISALLOW_COPY_AND_ASSIGN(PluginView); |
| 34 |
| 35 ViewData view_data_; |
| 36 }; |
| 37 |
| 38 } // namespace ppapi_proxy |
| 39 |
| 40 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_ |
| 41 |
OLD | NEW |