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 563842 86436c6e6567aef2782861b05b34054aec2297b0
parent 563841 02180c4da80e617754eb37e3a54a3cf9044b0a71
child 563843 3cffd9fa6957fead350f3fdf686e2787fef4de2e
push id54439
push userbmo:rbarker@mozilla.com
push dateMon, 17 Apr 2017 22:56:51 +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',