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

Side by Side Diff: ppapi/shared_impl/ppb_view_shared.cc

Issue 8951014: Change the DidChangeView update to take a new ViewChanged resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More nacl fixes Created 8 years, 11 months 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
(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 {
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698