diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-04 13:48:29 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-04 13:48:29 +0000 |
commit | ccc5fabaf033622d17e1d0cb374ac2c96aa5f923 (patch) | |
tree | 1dfb4a716ad35d019dbb4b0013b6f33162c1ef58 /ppapi/thunk | |
parent | 932f3cd5414df09d1d64be969f3c0d9aedacc4a3 (diff) | |
download | chromium_src-ccc5fabaf033622d17e1d0cb374ac2c96aa5f923.zip chromium_src-ccc5fabaf033622d17e1d0cb374ac2c96aa5f923.tar.gz chromium_src-ccc5fabaf033622d17e1d0cb374ac2c96aa5f923.tar.bz2 |
Switch a number of code and header files from DOS to Unix line-endings.
This is mainly relevant for the IDL-generated PPAPI headers, whose line-endings reflect the convention for the platform on which they were most recently re-generated, leading to bogus whole-file diffs.
Note that this CL specifically does not update the Copyright years on the affected files, since the changes are whitespace-only.
BUG=109116
TEST=diff --ignore-space-at-eol should give no output for this patch.
TBR=dmichael
Review URL: http://codereview.chromium.org/9087006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/ppb_view_api.h | 62 | ||||
-rw-r--r-- | ppapi/thunk/ppb_view_thunk.cc | 192 |
2 files changed, 127 insertions, 127 deletions
diff --git a/ppapi/thunk/ppb_view_api.h b/ppapi/thunk/ppb_view_api.h index 377658a..50e256e 100644 --- a/ppapi/thunk/ppb_view_api.h +++ b/ppapi/thunk/ppb_view_api.h @@ -1,31 +1,31 @@ -// 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.
-
-#ifndef PPAPI_THUNK_PPB_VIEW_API_H_
-#define PPAPI_THUNK_PPB_VIEW_API_H_
-
-#include "ppapi/thunk/ppapi_thunk_export.h"
-
-namespace ppapi {
-
-struct ViewData;
-
-namespace thunk {
-
-class PPAPI_THUNK_EXPORT PPB_View_API {
- public:
- virtual ~PPB_View_API() {}
-
- // Returns the view data struct. We could have virtual functions here for
- // each PPAPI function, but that would be more boilerplate for these simple
- // getters so the logic is implemented in the thunk layer. If we start
- // autogenerating the thunk layer and need this to be more regular, adding
- // the API functions here should be fine.
- virtual const ViewData& GetData() const = 0;
-};
-
-} // namespace thunk
-} // namespace ppapi
-
-#endif // PPAPI_THUNK_PPB_VIEW_API_H_
+// 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. + +#ifndef PPAPI_THUNK_PPB_VIEW_API_H_ +#define PPAPI_THUNK_PPB_VIEW_API_H_ + +#include "ppapi/thunk/ppapi_thunk_export.h" + +namespace ppapi { + +struct ViewData; + +namespace thunk { + +class PPAPI_THUNK_EXPORT PPB_View_API { + public: + virtual ~PPB_View_API() {} + + // Returns the view data struct. We could have virtual functions here for + // each PPAPI function, but that would be more boilerplate for these simple + // getters so the logic is implemented in the thunk layer. If we start + // autogenerating the thunk layer and need this to be more regular, adding + // the API functions here should be fine. + virtual const ViewData& GetData() const = 0; +}; + +} // namespace thunk +} // namespace ppapi + +#endif // PPAPI_THUNK_PPB_VIEW_API_H_ diff --git a/ppapi/thunk/ppb_view_thunk.cc b/ppapi/thunk/ppb_view_thunk.cc index 2615fea..04246c5 100644 --- a/ppapi/thunk/ppb_view_thunk.cc +++ b/ppapi/thunk/ppb_view_thunk.cc @@ -1,96 +1,96 @@ -// 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/c/ppb_view.h"
-#include "ppapi/shared_impl/ppb_view_shared.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_view_api.h"
-#include "ppapi/thunk/thunk.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-typedef EnterResource<PPB_View_API> EnterView;
-
-bool IsRectVisible(const PP_Rect& rect) {
- return rect.size.width > 0 && rect.size.height > 0;
-}
-
-PP_Bool IsView(PP_Resource resource) {
- EnterView enter(resource, false);
- return enter.succeeded() ? PP_TRUE : PP_FALSE;
-}
-
-PP_Bool GetSize(PP_Resource resource, PP_Size* size) {
- EnterView enter(resource, true);
- if (enter.failed() || !size)
- return PP_FALSE;
- *size = enter.object()->GetData().rect.size;
- return PP_TRUE;
-}
-
-PP_Bool GetRect(PP_Resource resource, PP_Rect* viewport) {
- EnterView enter(resource, true);
- if (enter.failed() || !viewport)
- return PP_FALSE;
- *viewport = enter.object()->GetData().rect;
- return PP_TRUE;
-}
-
-PP_Bool IsFullscreen(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->GetData().is_fullscreen);
-}
-
-PP_Bool IsUserVisible(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->GetData().is_page_visible &&
- IsRectVisible(enter.object()->GetData().clip_rect));
-}
-
-PP_Bool IsPageVisible(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->GetData().is_page_visible);
-}
-
-PP_Bool IsClipVisible(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(IsRectVisible(enter.object()->GetData().clip_rect));
-}
-
-PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) {
- EnterView enter(resource, true);
- if (enter.failed() || !clip)
- return PP_FALSE;
- *clip = enter.object()->GetData().clip_rect;
- return PP_TRUE;
-}
-
-const PPB_View g_ppb_view_thunk = {
- &IsView,
- &GetRect,
- &IsFullscreen,
- &IsUserVisible,
- &IsPageVisible,
- &GetClipRect
-};
-
-} // namespace
-
-const PPB_View* GetPPB_View_Thunk() {
- return &g_ppb_view_thunk;
-}
-
-} // namespace thunk
-} // namespace ppapi
+// 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/c/ppb_view.h" +#include "ppapi/shared_impl/ppb_view_shared.h" +#include "ppapi/thunk/enter.h" +#include "ppapi/thunk/ppb_view_api.h" +#include "ppapi/thunk/thunk.h" + +namespace ppapi { +namespace thunk { + +namespace { + +typedef EnterResource<PPB_View_API> EnterView; + +bool IsRectVisible(const PP_Rect& rect) { + return rect.size.width > 0 && rect.size.height > 0; +} + +PP_Bool IsView(PP_Resource resource) { + EnterView enter(resource, false); + return enter.succeeded() ? PP_TRUE : PP_FALSE; +} + +PP_Bool GetSize(PP_Resource resource, PP_Size* size) { + EnterView enter(resource, true); + if (enter.failed() || !size) + return PP_FALSE; + *size = enter.object()->GetData().rect.size; + return PP_TRUE; +} + +PP_Bool GetRect(PP_Resource resource, PP_Rect* viewport) { + EnterView enter(resource, true); + if (enter.failed() || !viewport) + return PP_FALSE; + *viewport = enter.object()->GetData().rect; + return PP_TRUE; +} + +PP_Bool IsFullscreen(PP_Resource resource) { + EnterView enter(resource, true); + if (enter.failed()) + return PP_FALSE; + return PP_FromBool(enter.object()->GetData().is_fullscreen); +} + +PP_Bool IsUserVisible(PP_Resource resource) { + EnterView enter(resource, true); + if (enter.failed()) + return PP_FALSE; + return PP_FromBool(enter.object()->GetData().is_page_visible && + IsRectVisible(enter.object()->GetData().clip_rect)); +} + +PP_Bool IsPageVisible(PP_Resource resource) { + EnterView enter(resource, true); + if (enter.failed()) + return PP_FALSE; + return PP_FromBool(enter.object()->GetData().is_page_visible); +} + +PP_Bool IsClipVisible(PP_Resource resource) { + EnterView enter(resource, true); + if (enter.failed()) + return PP_FALSE; + return PP_FromBool(IsRectVisible(enter.object()->GetData().clip_rect)); +} + +PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) { + EnterView enter(resource, true); + if (enter.failed() || !clip) + return PP_FALSE; + *clip = enter.object()->GetData().clip_rect; + return PP_TRUE; +} + +const PPB_View g_ppb_view_thunk = { + &IsView, + &GetRect, + &IsFullscreen, + &IsUserVisible, + &IsPageVisible, + &GetClipRect +}; + +} // namespace + +const PPB_View* GetPPB_View_Thunk() { + return &g_ppb_view_thunk; +} + +} // namespace thunk +} // namespace ppapi |