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

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

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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
« no previous file with comments | « ppapi/shared_impl/ppb_view_shared.h ('k') | ppapi/tests/all_c_includes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ppapi/shared_impl/ppb_view_shared.h" 5 #include "ppapi/shared_impl/ppb_view_shared.h"
6 6
7 namespace ppapi { 7 namespace ppapi {
8 8
9 ViewData::ViewData() { 9 ViewData::ViewData() {
10 // Assume POD. 10 // Assume POD.
11 memset(this, 0, sizeof(ViewData)); 11 memset(this, 0, sizeof(ViewData));
12 } 12 }
13 13
14 ViewData::~ViewData() { 14 ViewData::~ViewData() {
15 } 15 }
16 16
17 bool ViewData::Equals(const ViewData& other) const { 17 bool ViewData::Equals(const ViewData& other) const {
18 return rect.point.x == other.rect.point.x && 18 return rect.point.x == other.rect.point.x &&
19 rect.point.y == other.rect.point.y && 19 rect.point.y == other.rect.point.y &&
20 rect.size.width == other.rect.size.width && 20 rect.size.width == other.rect.size.width &&
21 rect.size.height == other.rect.size.height && 21 rect.size.height == other.rect.size.height &&
22 is_fullscreen == other.is_fullscreen && 22 is_fullscreen == other.is_fullscreen &&
23 is_page_visible == other.is_page_visible && 23 is_page_visible == other.is_page_visible &&
24 clip_rect.point.x == other.clip_rect.point.x && 24 clip_rect.point.x == other.clip_rect.point.x &&
25 clip_rect.point.y == other.clip_rect.point.y && 25 clip_rect.point.y == other.clip_rect.point.y &&
26 clip_rect.size.width == other.clip_rect.size.width && 26 clip_rect.size.width == other.clip_rect.size.width &&
27 clip_rect.size.height == other.clip_rect.size.height; 27 clip_rect.size.height == other.clip_rect.size.height &&
28 device_scale == other.device_scale &&
29 css_scale == other.css_scale;
28 } 30 }
29 31
30 PPB_View_Shared::PPB_View_Shared(ResourceObjectType type, 32 PPB_View_Shared::PPB_View_Shared(ResourceObjectType type,
31 PP_Instance instance, 33 PP_Instance instance,
32 const ViewData& data) 34 const ViewData& data)
33 : Resource(type, instance), 35 : Resource(type, instance),
34 data_(data) { 36 data_(data) {
35 } 37 }
36 38
37 PPB_View_Shared::~PPB_View_Shared() { 39 PPB_View_Shared::~PPB_View_Shared() {
38 } 40 }
39 41
40 thunk::PPB_View_API* PPB_View_Shared::AsPPB_View_API() { 42 thunk::PPB_View_API* PPB_View_Shared::AsPPB_View_API() {
41 return this; 43 return this;
42 } 44 }
43 45
44 const ViewData& PPB_View_Shared::GetData() const { 46 const ViewData& PPB_View_Shared::GetData() const {
45 return data_; 47 return data_;
46 } 48 }
47 49
48 } // namespace ppapi 50 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_view_shared.h ('k') | ppapi/tests/all_c_includes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698