/src/mozilla-central/gfx/layers/apz/util/InputAPZContext.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "InputAPZContext.h" |
8 | | |
9 | | namespace mozilla { |
10 | | namespace layers { |
11 | | |
12 | | ScrollableLayerGuid InputAPZContext::sGuid; |
13 | | uint64_t InputAPZContext::sBlockId = 0; |
14 | | nsEventStatus InputAPZContext::sApzResponse = nsEventStatus_eIgnore; |
15 | | bool InputAPZContext::sPendingLayerization = false; |
16 | | bool InputAPZContext::sRoutedToChildProcess = false; |
17 | | |
18 | | /*static*/ ScrollableLayerGuid |
19 | | InputAPZContext::GetTargetLayerGuid() |
20 | 0 | { |
21 | 0 | return sGuid; |
22 | 0 | } |
23 | | |
24 | | /*static*/ uint64_t |
25 | | InputAPZContext::GetInputBlockId() |
26 | 0 | { |
27 | 0 | return sBlockId; |
28 | 0 | } |
29 | | |
30 | | /*static*/ nsEventStatus |
31 | | InputAPZContext::GetApzResponse() |
32 | 0 | { |
33 | 0 | return sApzResponse; |
34 | 0 | } |
35 | | |
36 | | /*static*/ bool |
37 | | InputAPZContext::HavePendingLayerization() |
38 | 0 | { |
39 | 0 | return sPendingLayerization; |
40 | 0 | } |
41 | | |
42 | | /*static*/ bool |
43 | | InputAPZContext::WasRoutedToChildProcess() |
44 | 0 | { |
45 | 0 | return sRoutedToChildProcess; |
46 | 0 | } |
47 | | |
48 | | InputAPZContext::InputAPZContext(const ScrollableLayerGuid& aGuid, |
49 | | const uint64_t& aBlockId, |
50 | | const nsEventStatus& aApzResponse, |
51 | | bool aPendingLayerization) |
52 | | : mOldGuid(sGuid) |
53 | | , mOldBlockId(sBlockId) |
54 | | , mOldApzResponse(sApzResponse) |
55 | | , mOldPendingLayerization(sPendingLayerization) |
56 | | , mOldRoutedToChildProcess(sRoutedToChildProcess) |
57 | 0 | { |
58 | 0 | sGuid = aGuid; |
59 | 0 | sBlockId = aBlockId; |
60 | 0 | sApzResponse = aApzResponse; |
61 | 0 | sPendingLayerization = aPendingLayerization; |
62 | 0 | sRoutedToChildProcess = false; |
63 | 0 | } |
64 | | |
65 | | InputAPZContext::~InputAPZContext() |
66 | 0 | { |
67 | 0 | sGuid = mOldGuid; |
68 | 0 | sBlockId = mOldBlockId; |
69 | 0 | sApzResponse = mOldApzResponse; |
70 | 0 | sPendingLayerization = mOldPendingLayerization; |
71 | 0 | sRoutedToChildProcess = mOldRoutedToChildProcess; |
72 | 0 | } |
73 | | |
74 | | /*static*/ void |
75 | | InputAPZContext::SetRoutedToChildProcess() |
76 | 0 | { |
77 | 0 | sRoutedToChildProcess = true; |
78 | 0 | } |
79 | | |
80 | | } // namespace layers |
81 | | } // namespace mozilla |