layout/ipc/RenderFrameUtils.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/ipc/RenderFrameUtils.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + * vim: sw=2 ts=8 et :
     1.6 + */
     1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.9 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifndef mozilla_layer_RenderFrameUtils_h
    1.12 +#define mozilla_layer_RenderFrameUtils_h
    1.13 +
    1.14 +#include "ipc/IPCMessageUtils.h"
    1.15 +
    1.16 +namespace mozilla {
    1.17 +namespace layout {
    1.18 +
    1.19 +enum ScrollingBehavior {
    1.20 +  /**
    1.21 +   * Use default scrolling behavior, which is synchronous: web content
    1.22 +   * is reflowed and repainted for every scroll or zoom.
    1.23 +   */
    1.24 +  DEFAULT_SCROLLING,
    1.25 +  /**
    1.26 +   * Use asynchronous panning and zooming, in which prerendered
    1.27 +   * content can be translated and scaled independently of the thread
    1.28 +   * painting content, without content reflowing or repainting.
    1.29 +   */
    1.30 +  ASYNC_PAN_ZOOM,
    1.31 +  SCROLLING_BEHAVIOR_SENTINEL
    1.32 +};
    1.33 +
    1.34 +} // namespace layout
    1.35 +} // namespace mozilla
    1.36 +
    1.37 +namespace IPC {
    1.38 +
    1.39 +template <>
    1.40 +struct ParamTraits<mozilla::layout::ScrollingBehavior>
    1.41 +  : public ContiguousEnumSerializer<
    1.42 +             mozilla::layout::ScrollingBehavior,
    1.43 +             mozilla::layout::DEFAULT_SCROLLING,
    1.44 +             mozilla::layout::SCROLLING_BEHAVIOR_SENTINEL>
    1.45 +{};
    1.46 +
    1.47 +} // namespace IPC
    1.48 +
    1.49 +#endif // mozilla_layer_RenderFrameUtils_h

mercurial