Run VM apptests on Android; disable fixtures failing or timing out.
[chromium-blink-merge.git] / ppapi / shared_impl / ppb_view_shared.h
bloba0e37945f448a7a93fdf81c11ecae9ad0150bb52
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
3 // found in the LICENSE file.
5 #ifndef PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_
8 #include "base/compiler_specific.h"
9 #include "ppapi/c/pp_rect.h"
10 #include "ppapi/c/pp_size.h"
11 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_view_api.h"
14 namespace ppapi {
16 // If you add to this struct, be sure to update the serialization in
17 // ppapi_messages.h.
18 struct PPAPI_SHARED_EXPORT ViewData {
19 ViewData();
20 ~ViewData();
22 bool Equals(const ViewData& other) const;
24 PP_Rect rect;
25 bool is_fullscreen;
26 bool is_page_visible;
27 PP_Rect clip_rect;
28 float device_scale;
29 float css_scale;
30 PP_Point scroll_offset;
33 class PPAPI_SHARED_EXPORT PPB_View_Shared : public Resource,
34 public thunk::PPB_View_API {
35 public:
36 PPB_View_Shared(ResourceObjectType type,
37 PP_Instance instance,
38 const ViewData& data);
39 ~PPB_View_Shared() override;
41 // Resource overrides.
42 thunk::PPB_View_API* AsPPB_View_API() override;
44 // PPB_View_API implementation.
45 const ViewData& GetData() const override;
46 PP_Bool GetRect(PP_Rect* viewport) const override;
47 PP_Bool IsFullscreen() const override;
48 PP_Bool IsVisible() const override;
49 PP_Bool IsPageVisible() const override;
50 PP_Bool GetClipRect(PP_Rect* clip) const override;
51 float GetDeviceScale() const override;
52 float GetCSSScale() const override;
53 PP_Bool GetScrollOffset(PP_Point* scroll_offset) const override;
55 private:
56 ViewData data_;
58 DISALLOW_COPY_AND_ASSIGN(PPB_View_Shared);
61 } // namespace ppapi
63 #endif // PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_