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 be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ppapi/shared_impl/ppb_view_shared.h" | |
6 | |
7 namespace ppapi { | |
8 | |
9 ViewData::ViewData() { | |
10 // Assume POD. | |
11 memset(this, 0, sizeof(ViewData)); | |
12 } | |
13 | |
14 ViewData::~ViewData() { | |
15 } | |
16 | |
17 bool ViewData::Equals(const ViewData& other) const { | |
dmichael (off chromium)
2011/12/20 19:01:34
Do you still use this?
brettw
2011/12/21 23:55:29
Yes, in PluginInstance to avoid sending duplicate
| |
18 return rect.point.x == other.rect.point.x && | |
19 rect.point.y == other.rect.point.y && | |
20 rect.size.width == other.rect.size.width && | |
21 rect.size.height == other.rect.size.height && | |
22 is_fullscreen == other.is_fullscreen && | |
23 is_page_visible == other.is_page_visible && | |
24 clip_rect.point.x == other.clip_rect.point.x && | |
25 clip_rect.point.y == other.clip_rect.point.y && | |
26 clip_rect.size.width == other.clip_rect.size.width && | |
27 clip_rect.size.height == other.clip_rect.size.height; | |
28 } | |
29 | |
30 PPB_View_Shared::PPB_View_Shared(const InitAsImpl&, | |
31 PP_Instance instance, | |
32 const ViewData& data) | |
33 : Resource(instance), | |
34 data_(data) { | |
35 } | |
36 | |
37 PPB_View_Shared::PPB_View_Shared(const InitAsProxy&, | |
38 PP_Instance instance, | |
39 const ViewData& data) | |
40 : Resource(HostResource::MakeInstanceOnly(instance)), | |
41 data_(data) { | |
42 } | |
43 | |
44 PPB_View_Shared::~PPB_View_Shared() { | |
45 } | |
46 | |
47 thunk::PPB_View_API* PPB_View_Shared::AsPPB_View_API() { | |
48 return this; | |
49 } | |
50 | |
51 const ViewData& PPB_View_Shared::GetData() const { | |
52 return data_; | |
53 } | |
54 | |
55 } // namespace ppapi | |
OLD | NEW |