diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 23:10:36 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 23:10:36 +0000 |
commit | c6da0bcc3876339b7c78e8306856ca4de395e5a9 (patch) | |
tree | 248c3ce2e1791379a51adf398833e019906e939c /ppapi/cpp | |
parent | 48a7a491fbe7a63d2b213a935b1ee15e6664fb95 (diff) | |
download | chromium_src-c6da0bcc3876339b7c78e8306856ca4de395e5a9.zip chromium_src-c6da0bcc3876339b7c78e8306856ca4de395e5a9.tar.gz chromium_src-c6da0bcc3876339b7c78e8306856ca4de395e5a9.tar.bz2 |
Fix line endings in ppapi. No code change.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10052028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/mouse_cursor.cc | 62 | ||||
-rw-r--r-- | ppapi/cpp/mouse_cursor.h | 112 |
2 files changed, 87 insertions, 87 deletions
diff --git a/ppapi/cpp/mouse_cursor.cc b/ppapi/cpp/mouse_cursor.cc index c5ac20a..acef57a 100644 --- a/ppapi/cpp/mouse_cursor.cc +++ b/ppapi/cpp/mouse_cursor.cc @@ -1,31 +1,31 @@ -// Copyright (c) 2012 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/cpp/mouse_cursor.h"
-
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_MouseCursor_1_0>() {
- return PPB_MOUSECURSOR_INTERFACE_1_0;
-}
-
-} // namespace
-
-// static
-bool MouseCursor::SetCursor(const InstanceHandle& instance,
- PP_MouseCursor_Type type,
- const ImageData& image,
- const Point& hot_spot) {
- if (!has_interface<PPB_MouseCursor_1_0>())
- return false;
- return PP_ToBool(get_interface<PPB_MouseCursor_1_0>()->SetCursor(
- instance.pp_instance(), type, image.pp_resource(),
- &hot_spot.pp_point()));
-}
-
-} // namespace pp
+// Copyright (c) 2012 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/cpp/mouse_cursor.h" + +#include "ppapi/cpp/module_impl.h" + +namespace pp { + +namespace { + +template <> const char* interface_name<PPB_MouseCursor_1_0>() { + return PPB_MOUSECURSOR_INTERFACE_1_0; +} + +} // namespace + +// static +bool MouseCursor::SetCursor(const InstanceHandle& instance, + PP_MouseCursor_Type type, + const ImageData& image, + const Point& hot_spot) { + if (!has_interface<PPB_MouseCursor_1_0>()) + return false; + return PP_ToBool(get_interface<PPB_MouseCursor_1_0>()->SetCursor( + instance.pp_instance(), type, image.pp_resource(), + &hot_spot.pp_point())); +} + +} // namespace pp diff --git a/ppapi/cpp/mouse_cursor.h b/ppapi/cpp/mouse_cursor.h index a54084e..ec1374c 100644 --- a/ppapi/cpp/mouse_cursor.h +++ b/ppapi/cpp/mouse_cursor.h @@ -1,56 +1,56 @@ -// Copyright (c) 2012 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_CPP_MOUSE_CURSOR_H_
-#define PPAPI_CPP_MOUSE_CURSOR_H_
-
-#include "ppapi/c/ppb_mouse_cursor.h"
-#include "ppapi/cpp/image_data.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/point.h"
-
-namespace pp {
-
-class MouseCursor {
- public:
- /// Sets the given mouse cursor. The mouse cursor will be in effect whenever
- /// the mouse is over the given instance until it is set again by another
- /// call. Note that you can hide the mouse cursor by setting it to the
- /// <code>PP_MOUSECURSOR_TYPE_NONE</code> type.
- ///
- /// This function allows setting both system defined mouse cursors and
- /// custom cursors. To set a system-defined cursor, pass the type you want
- /// and set the custom image to a default-constructor ImageData object.
- /// To set a custom cursor, set the type to
- /// <code>PP_MOUSECURSOR_TYPE_CUSTOM</code> and specify your image and hot
- /// spot.
- ///
- /// @param[in] instance A handle indentifying the instance that the mouse
- /// cursor will affect.
- ///
- /// @param[in] type A <code>PP_MouseCursor_Type</code> identifying the type
- /// of mouse cursor to show. See <code>ppapi/c/ppb_mouse_cursor.h</code>.
- ///
- /// @param[in] image A <code>ImageData</code> object identifying the
- /// custom image to set when the type is
- /// <code>PP_MOUSECURSOR_TYPE_CUSTOM</code>. The image must be less than 32
- /// pixels in each direction and must be of the system's native image format.
- /// When you are specifying a predefined cursor, this parameter should be a
- /// default-constructed ImageData.
- ///
- /// @param[in] hot_spot When setting a custom cursor, this idenfifies the
- /// pixel position within the given image of the "hot spot" of the cursor.
- /// When specifying a stock cursor, this parameter is ignored.
- ///
- /// @return true on success, or false if the instance or cursor type
- /// was invalid or if the image was too large.
- static bool SetCursor(const InstanceHandle& instance,
- PP_MouseCursor_Type type,
- const ImageData& image = ImageData(),
- const Point& hot_spot = Point(0, 0));
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_MOUSE_CURSOR_H_
+// Copyright (c) 2012 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_CPP_MOUSE_CURSOR_H_ +#define PPAPI_CPP_MOUSE_CURSOR_H_ + +#include "ppapi/c/ppb_mouse_cursor.h" +#include "ppapi/cpp/image_data.h" +#include "ppapi/cpp/instance_handle.h" +#include "ppapi/cpp/point.h" + +namespace pp { + +class MouseCursor { + public: + /// Sets the given mouse cursor. The mouse cursor will be in effect whenever + /// the mouse is over the given instance until it is set again by another + /// call. Note that you can hide the mouse cursor by setting it to the + /// <code>PP_MOUSECURSOR_TYPE_NONE</code> type. + /// + /// This function allows setting both system defined mouse cursors and + /// custom cursors. To set a system-defined cursor, pass the type you want + /// and set the custom image to a default-constructor ImageData object. + /// To set a custom cursor, set the type to + /// <code>PP_MOUSECURSOR_TYPE_CUSTOM</code> and specify your image and hot + /// spot. + /// + /// @param[in] instance A handle indentifying the instance that the mouse + /// cursor will affect. + /// + /// @param[in] type A <code>PP_MouseCursor_Type</code> identifying the type + /// of mouse cursor to show. See <code>ppapi/c/ppb_mouse_cursor.h</code>. + /// + /// @param[in] image A <code>ImageData</code> object identifying the + /// custom image to set when the type is + /// <code>PP_MOUSECURSOR_TYPE_CUSTOM</code>. The image must be less than 32 + /// pixels in each direction and must be of the system's native image format. + /// When you are specifying a predefined cursor, this parameter should be a + /// default-constructed ImageData. + /// + /// @param[in] hot_spot When setting a custom cursor, this idenfifies the + /// pixel position within the given image of the "hot spot" of the cursor. + /// When specifying a stock cursor, this parameter is ignored. + /// + /// @return true on success, or false if the instance or cursor type + /// was invalid or if the image was too large. + static bool SetCursor(const InstanceHandle& instance, + PP_MouseCursor_Type type, + const ImageData& image = ImageData(), + const Point& hot_spot = Point(0, 0)); +}; + +} // namespace pp + +#endif // PPAPI_CPP_MOUSE_CURSOR_H_ |