Bug 1335895 - part 8: Add UiCompositorControllerMessageTypes.h r=kats,botond draft
authorRandall Barker <rbarker@mozilla.com>
Thu, 13 Apr 2017 15:30:38 -0700
changeset 565557 b705a11c6a7a6795e46c8d70ace828c5c0d2f663
parent 565556 495e3332c0966dd6f04f8e3dbe70049f47952515
child 565558 0913a9c916351c6482f1ecf63004f772d11ecd41
push id54904
push userbmo:rbarker@mozilla.com
push dateThu, 20 Apr 2017 02:39:58 +0000
reviewerskats, botond
bugs1335895
milestone55.0a1
Bug 1335895 - part 8: Add UiCompositorControllerMessageTypes.h r=kats,botond MozReview-Commit-ID: 4637N8cXXpO
gfx/layers/ipc/UiCompositorControllerMessageTypes.h
gfx/layers/moz.build
new file mode 100644
--- /dev/null
+++ b/gfx/layers/ipc/UiCompositorControllerMessageTypes.h
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set sw=2 ts=8 et tw=80 : */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef include_gfx_ipc_UiCompositorControllerMessageTypes_h
+#define include_gfx_ipc_UiCompositorControllerMessageTypes_h
+
+namespace mozilla {
+namespace layers {
+
+//
+// NOTE: These values are also defined in mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
+//       and must be kept in sync. Any new message added here must also be added there to the AnimatorMessageType enum.
+//
+
+enum UiCompositorControllerMessageTypes {
+  STATIC_TOOLBAR_NEEDS_UPDATE      = 0,  // Sent from compositor when the static toolbar wants to hide.
+  STATIC_TOOLBAR_READY             = 1,  // Sent from compositor when the static toolbar image has been updated and is ready to animate.
+  TOOLBAR_HIDDEN                   = 2,  // Sent to compositor when the real toolbar has been hidden.
+  TOOLBAR_VISIBLE                  = 3,  // Sent to compositor when the real toolbar has been made  visible
+  TOOLBAR_SHOW                     = 4,  // Sent from compositor when the real toolbar should be shown
+  FIRST_PAINT                      = 5,  // Sent from compositor after first paint
+  REQUEST_SHOW_TOOLBAR_IMMEDIATELY = 6,  // Sent to the compositor when the snapshot should be shown immediately
+  REQUEST_SHOW_TOOLBAR_ANIMATED    = 7,  // Sent to the compositor when the snapshot should be shown with an animation
+  REQUEST_HIDE_TOOLBAR_IMMEDIATELY = 8,  // Sent to the compositor when the snapshot should be hidden immediately
+  REQUEST_HIDE_TOOLBAR_ANIMATED    = 9,  // Sent to the compositor when the snapshot should be hidden with an animation
+  LAYERS_UPDATED                   = 10, // Sent from the compositor when any layer has been updated
+  COMPOSITOR_CONTROLLER_OPEN       = 20  // Compositor controller IPC is open
+};
+
+} // namespace layers
+} // namespace mozilla
+
+#endif // include_gfx_ipc_UiCompositorControllerMessageTypes_h
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -173,16 +173,17 @@ EXPORTS.mozilla.layers += [
     'ipc/LayerTreeOwnerTracker.h',
     'ipc/RemoteContentController.h',
     'ipc/ShadowLayers.h',
     'ipc/SharedPlanarYCbCrImage.h',
     'ipc/SharedRGBImage.h',
     'ipc/SynchronousTask.h',
     'ipc/TextureForwarder.h',
     'ipc/UiCompositorControllerChild.h',
+    'ipc/UiCompositorControllerMessageTypes.h',
     'ipc/UiCompositorControllerParent.h',
     'ipc/VideoBridgeChild.h',
     'ipc/VideoBridgeParent.h',
     'LayerAttributes.h',
     'LayerMetricsWrapper.h',
     'LayersTypes.h',
     'opengl/CompositingRenderTargetOGL.h',
     'opengl/CompositorOGL.h',