| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_ |
| 6 #define PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ppapi/c/pp_rect.h" | 9 #include "ppapi/c/pp_rect.h" |
| 10 #include "ppapi/c/pp_size.h" | 10 #include "ppapi/c/pp_size.h" |
| 11 #include "ppapi/shared_impl/resource.h" | 11 #include "ppapi/shared_impl/resource.h" |
| 12 #include "ppapi/thunk/ppb_view_api.h" | 12 #include "ppapi/thunk/ppb_view_api.h" |
| 13 | 13 |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 | 15 |
| 16 // If you add to this struct, be sure to update the serialization in | 16 // If you add to this struct, be sure to update the serialization in |
| 17 // ppapi_messages.h. | 17 // ppapi_messages.h. |
| 18 struct PPAPI_SHARED_EXPORT ViewData { | 18 struct PPAPI_SHARED_EXPORT ViewData { |
| 19 ViewData(); | 19 ViewData(); |
| 20 ~ViewData(); | 20 ~ViewData(); |
| 21 | 21 |
| 22 bool Equals(const ViewData& other) const; | 22 bool Equals(const ViewData& other) const; |
| 23 | 23 |
| 24 PP_Rect rect; | 24 PP_Rect rect; |
| 25 bool is_fullscreen; | 25 bool is_fullscreen; |
| 26 bool is_page_visible; | 26 bool is_page_visible; |
| 27 PP_Rect clip_rect; | 27 PP_Rect clip_rect; |
| 28 float device_scale; |
| 29 float css_scale; |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 class PPAPI_SHARED_EXPORT PPB_View_Shared | 32 class PPAPI_SHARED_EXPORT PPB_View_Shared |
| 31 : public Resource, | 33 : public Resource, |
| 32 public thunk::PPB_View_API { | 34 public thunk::PPB_View_API { |
| 33 public: | 35 public: |
| 34 PPB_View_Shared(ResourceObjectType type, | 36 PPB_View_Shared(ResourceObjectType type, |
| 35 PP_Instance instance, | 37 PP_Instance instance, |
| 36 const ViewData& data); | 38 const ViewData& data); |
| 37 virtual ~PPB_View_Shared(); | 39 virtual ~PPB_View_Shared(); |
| 38 | 40 |
| 39 // Resource overrides. | 41 // Resource overrides. |
| 40 virtual thunk::PPB_View_API* AsPPB_View_API() OVERRIDE; | 42 virtual thunk::PPB_View_API* AsPPB_View_API() OVERRIDE; |
| 41 | 43 |
| 42 // PPB_View_API implementation. | 44 // PPB_View_API implementation. |
| 43 virtual const ViewData& GetData() const OVERRIDE; | 45 virtual const ViewData& GetData() const OVERRIDE; |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 ViewData data_; | 48 ViewData data_; |
| 47 | 49 |
| 48 DISALLOW_COPY_AND_ASSIGN(PPB_View_Shared); | 50 DISALLOW_COPY_AND_ASSIGN(PPB_View_Shared); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 } // namespace ppapi | 53 } // namespace ppapi |
| 52 | 54 |
| 53 #endif // PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_ | 55 #endif // PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_ |
| OLD | NEW |