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

Unified 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: New patch Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/shared_impl/ppb_view_shared.cc
diff --git a/ppapi/shared_impl/ppb_view_shared.cc b/ppapi/shared_impl/ppb_view_shared.cc
new file mode 100644
index 0000000000000000000000000000000000000000..30030d4d323ad7c40406a8c294aedee645eeb4de
--- /dev/null
+++ b/ppapi/shared_impl/ppb_view_shared.cc
@@ -0,0 +1,55 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ppapi/shared_impl/ppb_view_shared.h"
+
+namespace ppapi {
+
+ViewData::ViewData() {
+ // Assume POD.
+ memset(this, 0, sizeof(ViewData));
+}
+
+ViewData::~ViewData() {
+}
+
+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
+ return rect.point.x == other.rect.point.x &&
+ rect.point.y == other.rect.point.y &&
+ rect.size.width == other.rect.size.width &&
+ rect.size.height == other.rect.size.height &&
+ is_fullscreen == other.is_fullscreen &&
+ is_page_visible == other.is_page_visible &&
+ clip_rect.point.x == other.clip_rect.point.x &&
+ clip_rect.point.y == other.clip_rect.point.y &&
+ clip_rect.size.width == other.clip_rect.size.width &&
+ clip_rect.size.height == other.clip_rect.size.height;
+}
+
+PPB_View_Shared::PPB_View_Shared(const InitAsImpl&,
+ PP_Instance instance,
+ const ViewData& data)
+ : Resource(instance),
+ data_(data) {
+}
+
+PPB_View_Shared::PPB_View_Shared(const InitAsProxy&,
+ PP_Instance instance,
+ const ViewData& data)
+ : Resource(HostResource::MakeInstanceOnly(instance)),
+ data_(data) {
+}
+
+PPB_View_Shared::~PPB_View_Shared() {
+}
+
+thunk::PPB_View_API* PPB_View_Shared::AsPPB_View_API() {
+ return this;
+}
+
+const ViewData& PPB_View_Shared::GetData() const {
+ return data_;
+}
+
+} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698