Move mojo/public/c/gpu/* to mojo/public/c/include.

TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2236083002 .

Cr-Mirrored-From: https://github.com/domokit/mojo
Cr-Mirrored-Commit: e2b84add2d1f7187b58a9fee32873c9d6e95fe23
diff --git a/c/BUILD.gn b/c/BUILD.gn
index 4616fd7..43c4470 100644
--- a/c/BUILD.gn
+++ b/c/BUILD.gn
@@ -153,6 +153,113 @@
   mojo_sdk_deps = [ "mojo/public/cpp/system" ]
 }
 
+# gpu / gpu_onscreen -----------------------------------------------------------
+
+# TODO(vtl): Rationalize this to be more like the others. Probably, we should
+# just have :GLES2, :MGL, etc. targets (and no :gpu/:gpu_onscreen).
+
+group("gpu") {
+  public_deps = [
+    ":GLES2",
+    ":MGL",
+    ":MGL_signal_sync_point",
+  ]
+
+  deps = [
+    "../platform/native:gles2_thunks",
+  ]
+  if (!is_nacl) {
+    deps += [ "../platform/native:mgl_thunks" ]
+  }
+}
+
+group("gpu_onscreen") {
+  public_deps = [
+    ":MGL_onscreen",
+    ":gpu",
+  ]
+
+  if (!is_nacl) {
+    deps = [
+      "../platform/native:mgl_onscreen_thunks",
+    ]
+  }
+}
+
+mojo_sdk_source_set("MGL") {
+  public_configs = [ ":c_config" ]
+
+  sources = [
+    "include/MGL/mgl.h",
+    "include/MGL/mgl_types.h",
+  ]
+
+  public_deps = [
+    ":system",
+  ]
+}
+
+mojo_sdk_source_set("MGL_onscreen") {
+  public_configs = [ ":c_config" ]
+
+  sources = [
+    "include/MGL/mgl_onscreen.h",
+  ]
+
+  public_deps = [
+    ":MGL",
+  ]
+}
+
+mojo_sdk_source_set("MGL_echo") {
+  public_configs = [ ":c_config" ]
+
+  sources = [
+    "include/MGL/mgl_echo.h",
+  ]
+
+  public_deps = [
+    ":MGL",
+  ]
+}
+
+mojo_sdk_source_set("MGL_signal_sync_point") {
+  public_configs = [ ":c_config" ]
+
+  sources = [
+    "include/MGL/mgl_signal_sync_point.h",
+  ]
+
+  public_deps = [
+    ":MGL",
+  ]
+}
+
+mojo_sdk_source_set("GLES2") {
+  public_configs = [ ":c_config" ]
+
+  sources = [
+    "include/GLES2/gl2.h",
+    "include/GLES2/gl2ext.h",
+    "include/GLES2/gl2extmojo.h",
+    "include/GLES2/gl2mojo_autogen.h",
+    "include/GLES2/gl2mojo_internal.h",
+    "include/GLES2/gl2platform.h",
+  ]
+
+  public_deps = [
+    ":KHR",
+  ]
+}
+
+mojo_sdk_source_set("KHR") {
+  public_configs = [ ":c_config" ]
+
+  sources = [
+    "include/KHR/khrplatform.h",
+  ]
+}
+
 # system -----------------------------------------------------------------------
 
 # Headers in include/mojo/system (to be included as <mojo/system/HEADER.h>).
diff --git a/c/gpu/BUILD.gn b/c/gpu/BUILD.gn
deleted file mode 100644
index c3765fd..0000000
--- a/c/gpu/BUILD.gn
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 2015 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.
-
-import("../../mojo_sdk.gni")
-
-config("gpu_configs") {
-  include_dirs = [ "." ]
-}
-
-group("gpu") {
-  public_configs = [ ":gpu_configs" ]
-
-  deps = [
-    ":GLES2",
-    ":MGL",
-    ":MGL_signal_sync_point",
-    "../../platform/native:gles2",
-  ]
-  if (!is_nacl) {
-    deps += [ "../../platform/native:mgl_thunks" ]
-  }
-}
-
-group("gpu_onscreen") {
-  public_deps = [
-    ":MGL_onscreen",
-  ]
-
-  deps = [
-    ":gpu",
-  ]
-  if (!is_nacl) {
-    deps += [ "../../platform/native:mgl_onscreen_thunks" ]
-  }
-}
-
-mojo_sdk_source_set("MGL") {
-  sources = [
-    "MGL/mgl.h",
-    "MGL/mgl_types.h",
-  ]
-
-  mojo_sdk_public_deps = [ "mojo/public/c:system" ]
-}
-
-mojo_sdk_source_set("MGL_onscreen") {
-  sources = [
-    "MGL/mgl_onscreen.h",
-  ]
-
-  public_deps = [
-    ":MGL",
-  ]
-}
-
-mojo_sdk_source_set("MGL_echo") {
-  sources = [
-    "MGL/mgl_echo.h",
-  ]
-
-  public_deps = [
-    ":MGL",
-  ]
-}
-
-mojo_sdk_source_set("MGL_signal_sync_point") {
-  sources = [
-    "MGL/mgl_signal_sync_point.h",
-  ]
-
-  public_deps = [
-    ":MGL",
-  ]
-}
-
-mojo_sdk_source_set("GLES2") {
-  sources = [
-    "GLES2/gl2.h",
-    "GLES2/gl2ext.h",
-    "GLES2/gl2extmojo.h",
-    "GLES2/gl2mojo_autogen.h",
-    "GLES2/gl2mojo_internal.h",
-    "GLES2/gl2platform.h",
-  ]
-
-  public_deps = [
-    ":KHR",
-  ]
-}
-
-mojo_sdk_source_set("KHR") {
-  sources = [
-    "KHR/khrplatform.h",
-  ]
-}
diff --git a/c/gpu/MGL/mgl_echo.h b/c/gpu/MGL/mgl_echo.h
deleted file mode 100644
index 1b9285c..0000000
--- a/c/gpu/MGL/mgl_echo.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 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.
-
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_GPU_MGL_MGL_ECHO_H_
-#define MOJO_PUBLIC_C_GPU_MGL_MGL_ECHO_H_
-
-#include <stdint.h>
-
-#include "mojo/public/c/gpu/MGL/mgl_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*MGLEchoCallback)(void* closure);
-
-void MGLEcho(MGLEchoCallback callback, void* closure);
-
-#ifdef __cplusplus
-}  // extern "C"
-#endif
-
-#endif  // MOJO_PUBLIC_C_GPU_MGL_MGL_ECHO_H_
diff --git a/c/gpu/GLES2/gl2.h b/c/include/GLES2/gl2.h
similarity index 100%
rename from c/gpu/GLES2/gl2.h
rename to c/include/GLES2/gl2.h
diff --git a/c/gpu/GLES2/gl2ext.h b/c/include/GLES2/gl2ext.h
similarity index 100%
rename from c/gpu/GLES2/gl2ext.h
rename to c/include/GLES2/gl2ext.h
diff --git a/c/gpu/GLES2/gl2extmojo.h b/c/include/GLES2/gl2extmojo.h
similarity index 100%
rename from c/gpu/GLES2/gl2extmojo.h
rename to c/include/GLES2/gl2extmojo.h
diff --git a/c/gpu/GLES2/gl2mojo_autogen.h b/c/include/GLES2/gl2mojo_autogen.h
similarity index 100%
rename from c/gpu/GLES2/gl2mojo_autogen.h
rename to c/include/GLES2/gl2mojo_autogen.h
diff --git a/c/gpu/GLES2/gl2mojo_internal.h b/c/include/GLES2/gl2mojo_internal.h
similarity index 100%
rename from c/gpu/GLES2/gl2mojo_internal.h
rename to c/include/GLES2/gl2mojo_internal.h
diff --git a/c/gpu/GLES2/gl2platform.h b/c/include/GLES2/gl2platform.h
similarity index 100%
rename from c/gpu/GLES2/gl2platform.h
rename to c/include/GLES2/gl2platform.h
diff --git a/c/gpu/KHR/khrplatform.h b/c/include/KHR/khrplatform.h
similarity index 100%
rename from c/gpu/KHR/khrplatform.h
rename to c/include/KHR/khrplatform.h
diff --git a/c/gpu/MGL/mgl.h b/c/include/MGL/mgl.h
similarity index 90%
rename from c/gpu/MGL/mgl.h
rename to c/include/MGL/mgl.h
index da7d275..5c69598 100644
--- a/c/gpu/MGL/mgl.h
+++ b/c/include/MGL/mgl.h
@@ -4,17 +4,15 @@
 
 // Note: This header should be compilable as C.
 
-#ifndef MOJO_PUBLIC_C_GPU_MGL_MGL_H_
-#define MOJO_PUBLIC_C_GPU_MGL_MGL_H_
+#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_
+#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_
 
+#include <MGL/mgl_types.h>
+#include <mojo/macros.h>
 #include <mojo/system/handle.h>
 #include <stdint.h>
 
-#include "mojo/public/c/gpu/MGL/mgl_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+MOJO_BEGIN_EXTERN_C
 
 typedef uint32_t MGLOpenGLAPIVersion;
 
@@ -62,8 +60,6 @@
 // |name| is the name of the GL function.
 MGLMustCastToProperFunctionPointerType MGLGetProcAddress(const char* name);
 
-#ifdef __cplusplus
-}  // extern "C"
-#endif
+MOJO_END_EXTERN_C
 
-#endif  // MOJO_PUBLIC_C_GPU_MGL_MGL_H_
+#endif  // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_
diff --git a/c/include/MGL/mgl_echo.h b/c/include/MGL/mgl_echo.h
new file mode 100644
index 0000000..e78c427
--- /dev/null
+++ b/c/include/MGL/mgl_echo.h
@@ -0,0 +1,22 @@
+// Copyright 2016 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.
+
+// Note: This header should be compilable as C.
+
+#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ECHO_H_
+#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ECHO_H_
+
+#include <MGL/mgl_types.h>
+#include <mojo/macros.h>
+#include <stdint.h>
+
+MOJO_BEGIN_EXTERN_C
+
+typedef void (*MGLEchoCallback)(void* closure);
+
+void MGLEcho(MGLEchoCallback callback, void* closure);
+
+MOJO_END_EXTERN_C
+
+#endif  // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ECHO_H_
diff --git a/c/gpu/MGL/mgl_onscreen.h b/c/include/MGL/mgl_onscreen.h
similarity index 65%
rename from c/gpu/MGL/mgl_onscreen.h
rename to c/include/MGL/mgl_onscreen.h
index e72d921..5c3f2a0 100644
--- a/c/gpu/MGL/mgl_onscreen.h
+++ b/c/include/MGL/mgl_onscreen.h
@@ -4,16 +4,14 @@
 
 // Note: This header should be compilable as C.
 
-#ifndef MOJO_PUBLIC_C_GPU_MGL_MGL_ONSCREEN_H_
-#define MOJO_PUBLIC_C_GPU_MGL_MGL_ONSCREEN_H_
+#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ONSCREEN_H_
+#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ONSCREEN_H_
 
+#include <MGL/mgl_types.h>
+#include <mojo/macros.h>
 #include <stdint.h>
 
-#include "mojo/public/c/gpu/MGL/mgl_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+MOJO_BEGIN_EXTERN_C
 
 // Resizes the default framebuffer for the currently bound onscreen MGLContext.
 void MGLResizeSurface(uint32_t width, uint32_t height);
@@ -22,8 +20,6 @@
 // to the windowing system or display.
 void MGLSwapBuffers(void);
 
-#ifdef __cplusplus
-}  // extern "C"
-#endif
+MOJO_END_EXTERN_C
 
-#endif  // MOJO_PUBLIC_C_GPU_MGL_MGL_ONSCREEN_H_
+#endif  // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ONSCREEN_H_
diff --git a/c/gpu/MGL/mgl_signal_sync_point.h b/c/include/MGL/mgl_signal_sync_point.h
similarity index 67%
rename from c/gpu/MGL/mgl_signal_sync_point.h
rename to c/include/MGL/mgl_signal_sync_point.h
index a563c5f..0cb0e29 100644
--- a/c/gpu/MGL/mgl_signal_sync_point.h
+++ b/c/include/MGL/mgl_signal_sync_point.h
@@ -4,16 +4,14 @@
 
 // Note: This header should be compilable as C.
 
-#ifndef MOJO_PUBLIC_C_GPU_MGL_MGL_SIGNAL_SYNC_POINT_H_
-#define MOJO_PUBLIC_C_GPU_MGL_MGL_SIGNAL_SYNC_POINT_H_
+#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_SIGNAL_SYNC_POINT_H_
+#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_SIGNAL_SYNC_POINT_H_
 
+#include <MGL/mgl_types.h>
+#include <mojo/macros.h>
 #include <stdint.h>
 
-#include "mojo/public/c/gpu/MGL/mgl_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+MOJO_BEGIN_EXTERN_C
 
 typedef void (*MGLSyncPointCallback)(void* closure);
 
@@ -24,8 +22,6 @@
                         MGLSignalSyncPointCallback callback,
                         void* closure);
 
-#ifdef __cplusplus
-}  // extern "C"
-#endif
+MOJO_END_EXTERN_C
 
-#endif  // MOJO_PUBLIC_C_GPU_MGL_MGL_SIGNAL_SYNC_POINT_H_
+#endif  // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_SIGNAL_SYNC_POINT_H_
diff --git a/c/gpu/MGL/mgl_types.h b/c/include/MGL/mgl_types.h
similarity index 73%
rename from c/gpu/MGL/mgl_types.h
rename to c/include/MGL/mgl_types.h
index b28aee6..a38e254 100644
--- a/c/gpu/MGL/mgl_types.h
+++ b/c/include/MGL/mgl_types.h
@@ -4,12 +4,12 @@
 
 // Note: This header should be compilable as C.
 
-#ifndef MOJO_PUBLIC_C_GPU_MGL_TYPES_H_
-#define MOJO_PUBLIC_C_GPU_MGL_TYPES_H_
+#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_TYPES_H_
+#define MOJO_PUBLIC_C_INCLUDE_MGL_TYPES_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <mojo/macros.h>
+
+MOJO_BEGIN_EXTERN_C
 
 typedef struct MGLContextPrivate* MGLContext;
 typedef void (*MGLContextLostCallback)(void* closure);
@@ -19,8 +19,6 @@
 // type and calling convention before use.
 typedef void (*MGLMustCastToProperFunctionPointerType)(void);
 
-#ifdef __cplusplus
-}  // extern "C"
-#endif
+MOJO_END_EXTERN_C
 
-#endif  // MOJO_PUBLIC_C_GPU_MGL_TYPES_H_
+#endif  // MOJO_PUBLIC_C_INCLUDE_MGL_TYPES_H_
diff --git a/mojo_application.gni b/mojo_application.gni
index 512bf19..3863935 100644
--- a/mojo_application.gni
+++ b/mojo_application.gni
@@ -69,8 +69,9 @@
                                    mojo_root) ]
       }
 
-      deps =
-          rebase_path([ "mojo/public/platform/native:system" ], ".", mojo_root)
+      deps = rebase_path([ "mojo/public/platform/native:system_thunks" ],
+                         ".",
+                         mojo_root)
       if (defined(invoker.deps)) {
         deps += invoker.deps
       }
@@ -310,8 +311,9 @@
         sources = invoker.sources
       }
 
-      deps =
-          rebase_path([ "mojo/public/platform/native:system" ], ".", mojo_root)
+      deps = rebase_path([ "mojo/public/platform/native:system_thunks" ],
+                         ".",
+                         mojo_root)
       if (defined(invoker.jni_package)) {
         deps += [ ":${generate_jni_name}" ]
       }
diff --git a/platform/nacl/BUILD.gn b/platform/nacl/BUILD.gn
index ecbd523..4a1c39f 100644
--- a/platform/nacl/BUILD.gn
+++ b/platform/nacl/BUILD.gn
@@ -11,10 +11,10 @@
     "mojo_irt.h",
   ]
   mojo_sdk_public_deps = [
+    "mojo/public/c:MGL",
+    "mojo/public/c:MGL_onscreen",
+    "mojo/public/c:MGL_signal_sync_point",
     "mojo/public/c:system",
-    "mojo/public/c/gpu:MGL",
-    "mojo/public/c/gpu:MGL_onscreen",
-    "mojo/public/c/gpu:MGL_signal_sync_point",
   ]
 }
 
diff --git a/platform/nacl/mgl_irt.h b/platform/nacl/mgl_irt.h
index f2bdb5c..3430ae5 100644
--- a/platform/nacl/mgl_irt.h
+++ b/platform/nacl/mgl_irt.h
@@ -5,13 +5,13 @@
 #ifndef MOJO_PUBLIC_PLATFORM_NACL_MGL_IRT_H_
 #define MOJO_PUBLIC_PLATFORM_NACL_MGL_IRT_H_
 
-#include "mojo/public/c/gpu/MGL/mgl.h"
-#include "mojo/public/c/gpu/MGL/mgl_onscreen.h"
-#include "mojo/public/c/gpu/MGL/mgl_signal_sync_point.h"
+#include <MGL/mgl.h>
+#include <MGL/mgl_onscreen.h>
+#include <MGL/mgl_signal_sync_point.h>
 
 #define NACL_IRT_MGL_v0_1 "nacl-irt-mgl-0.1"
 
-// See mojo/public/c/gpu/MGL/mgl.h for documentation.
+// See mojo/public/c/include/MGL/mgl.h for documentation.
 struct nacl_irt_mgl {
   MGLContext (*MGLCreateContext)(MGLOpenGLAPIVersion version,
                                  MojoHandle command_buffer_handle,
@@ -27,7 +27,7 @@
 
 #define NACL_IRT_MGL_ONSCREEN_v0_1 "nacl-irt-mgl-onscreen-0.1"
 
-// See mojo/public/c/gpu/MGL/mgl_onscreen.h for documentation.
+// See mojo/public/c/include/MGL/mgl_onscreen.h for documentation.
 struct nacl_irt_mgl_onscreen {
   void (*MGLResizeSurface)(uint32_t width, uint32_t height);
   void (*MGLSwapBuffers)(void);
@@ -35,7 +35,7 @@
 
 #define NACL_IRT_MGL_SIGNAL_SYNC_POINT_v0_1 "nacl-irt-mgl-signal-sync-point-0.1"
 
-// See mojo/public/c/gpu/MGL/mgl_signal_sync_point.h for documentation.
+// See mojo/public/c/include/MGL/mgl_signal_sync_point.h for documentation.
 struct nacl_irt_mgl_signal_sync_point {
   void (*MGLSignalSyncPoint)(uint32_t sync_point,
                              MGLSignalSyncPointCallback callback,
diff --git a/platform/native/BUILD.gn b/platform/native/BUILD.gn
index 2b3f6d7..f220cf6 100644
--- a/platform/native/BUILD.gn
+++ b/platform/native/BUILD.gn
@@ -5,7 +5,7 @@
 import("../../mojo_sdk.gni")
 import("../../mojo_application.gni")
 
-mojo_sdk_source_set("system") {
+mojo_sdk_source_set("system_thunks") {
   sources = [
     "system_thunks.c",
     "system_thunks.h",
@@ -22,7 +22,7 @@
   # source_set here, this flag change is not needed.
 }
 
-mojo_sdk_source_set("gles2") {
+mojo_sdk_source_set("gles2_thunks") {
   sources = [
     "gles2_impl_chromium_bind_uniform_location_thunks.c",
     "gles2_impl_chromium_bind_uniform_location_thunks.h",
@@ -54,19 +54,12 @@
     "gles2_impl_thunks.h",
   ]
 
-  defines = [ "MOJO_GLES2_IMPLEMENTATION" ]
-
-  configs = [ "../../c/gpu:gpu_configs" ]
-
   mojo_sdk_deps = [
     "mojo/public/c:environment",
     "mojo/public/c:system",
-    "mojo/public/c/gpu:GLES2",
   ]
-}
 
-mojo_sdk_source_set("gpu_thunks") {
-  sources = []
+  mojo_sdk_public_deps = [ "mojo/public/c:GLES2" ]
 }
 
 mojo_sdk_source_set("mgl_thunks") {
@@ -79,10 +72,10 @@
     "mgl_thunks.h",
   ]
 
-  mojo_sdk_deps = [
-    "mojo/public/c/gpu:MGL",
-    "mojo/public/c/gpu:MGL_signal_sync_point",
-    "mojo/public/c/gpu:MGL_echo",
+  mojo_sdk_public_deps = [
+    "mojo/public/c:MGL",
+    "mojo/public/c:MGL_signal_sync_point",
+    "mojo/public/c:MGL_echo",
   ]
 }
 
@@ -92,7 +85,7 @@
     "mgl_onscreen_thunks.h",
   ]
 
-  mojo_sdk_deps = [ "mojo/public/c/gpu:MGL_onscreen" ]
+  mojo_sdk_public_deps = [ "mojo/public/c:MGL_onscreen" ]
 }
 
 mojo_sdk_source_set("platform_handle") {
@@ -101,10 +94,7 @@
     "platform_handle_private_thunks.h",
   ]
 
-  mojo_sdk_deps = [
-    "mojo/public/platform/native:platform_handle_api",
-    "mojo/public/c:system",
-  ]
+  mojo_sdk_public_deps = [ "mojo/public/platform/native:platform_handle_api" ]
 }
 
 # Only targets that are calling the thunks should depend upon this.
@@ -112,6 +102,7 @@
   sources = [
     "platform_handle_private.h",
   ]
+
   mojo_sdk_public_deps = [ "mojo/public/c:system" ]
 }
 
diff --git a/platform/native/gles2_impl_chromium_bind_uniform_location_thunks.h b/platform/native/gles2_impl_chromium_bind_uniform_location_thunks.h
index d29dd7e..8790d77 100644
--- a/platform/native/gles2_impl_chromium_bind_uniform_location_thunks.h
+++ b/platform/native/gles2_impl_chromium_bind_uniform_location_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the CHROMIUM_bind_uniform_location extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_chromium_map_sub_thunks.h b/platform/native/gles2_impl_chromium_map_sub_thunks.h
index c2a2e82..bb2d31a 100644
--- a/platform/native/gles2_impl_chromium_map_sub_thunks.h
+++ b/platform/native/gles2_impl_chromium_map_sub_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the CHROMIUM_map_sub extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_chromium_miscellaneous_thunks.h b/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
index 86a4e79..20ea2c4 100644
--- a/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
+++ b/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the CHROMIUM_miscellaneous extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_chromium_resize_thunks.h b/platform/native/gles2_impl_chromium_resize_thunks.h
index c5cae93..3f72c73 100644
--- a/platform/native/gles2_impl_chromium_resize_thunks.h
+++ b/platform/native/gles2_impl_chromium_resize_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the CHROMIUM_resize extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_chromium_sync_point_thunks.h b/platform/native/gles2_impl_chromium_sync_point_thunks.h
index 199d2c9..68735a1 100644
--- a/platform/native/gles2_impl_chromium_sync_point_thunks.h
+++ b/platform/native/gles2_impl_chromium_sync_point_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the CHROMIUM_sync_point extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_chromium_texture_mailbox_thunks.h b/platform/native/gles2_impl_chromium_texture_mailbox_thunks.h
index c8e4276..5b9538d 100644
--- a/platform/native/gles2_impl_chromium_texture_mailbox_thunks.h
+++ b/platform/native/gles2_impl_chromium_texture_mailbox_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the CHROMIUM_texture_mailbox extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_ext_debug_marker_thunks.h b/platform/native/gles2_impl_ext_debug_marker_thunks.h
index 33eab55..94a6459 100644
--- a/platform/native/gles2_impl_ext_debug_marker_thunks.h
+++ b/platform/native/gles2_impl_ext_debug_marker_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the EXT_debug_marker extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_ext_discard_framebuffer_thunks.h b/platform/native/gles2_impl_ext_discard_framebuffer_thunks.h
index 51eec3e..94e5195 100644
--- a/platform/native/gles2_impl_ext_discard_framebuffer_thunks.h
+++ b/platform/native/gles2_impl_ext_discard_framebuffer_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the EXT_discard_framebuffer extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.h b/platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.h
index dd9cef0..1b86d36 100644
--- a/platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.h
+++ b/platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the EXT_multisampled_render_to_texture
 // extension.
diff --git a/platform/native/gles2_impl_ext_occlusion_query_thunks.h b/platform/native/gles2_impl_ext_occlusion_query_thunks.h
index d0ba13f..5cc6e7e 100644
--- a/platform/native/gles2_impl_ext_occlusion_query_thunks.h
+++ b/platform/native/gles2_impl_ext_occlusion_query_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the EXT_occlusion_query extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_ext_texture_storage_thunks.h b/platform/native/gles2_impl_ext_texture_storage_thunks.h
index a5a48b3..f04c0f4 100644
--- a/platform/native/gles2_impl_ext_texture_storage_thunks.h
+++ b/platform/native/gles2_impl_ext_texture_storage_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the EXT_texture_storage extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_khr_blend_equation_advanced_thunks.h b/platform/native/gles2_impl_khr_blend_equation_advanced_thunks.h
index 89ffaa3..bb1a0bc 100644
--- a/platform/native/gles2_impl_khr_blend_equation_advanced_thunks.h
+++ b/platform/native/gles2_impl_khr_blend_equation_advanced_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the KHR_blend_equation_advanced extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_oes_vertex_array_object_thunks.h b/platform/native/gles2_impl_oes_vertex_array_object_thunks.h
index f3b43c4..a0c595f 100644
--- a/platform/native/gles2_impl_oes_vertex_array_object_thunks.h
+++ b/platform/native/gles2_impl_oes_vertex_array_object_thunks.h
@@ -14,7 +14,7 @@
 #include <stddef.h>
 
 #define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+#include <GLES2/gl2extmojo.h>
 
 // Specifies the frozen API for the OES_vertex_array_object extension.
 #pragma pack(push, 8)
diff --git a/platform/native/gles2_impl_thunks.h b/platform/native/gles2_impl_thunks.h
index 62cc654..9e560c0 100644
--- a/platform/native/gles2_impl_thunks.h
+++ b/platform/native/gles2_impl_thunks.h
@@ -5,10 +5,9 @@
 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
 
+#include <GLES2/gl2.h>
 #include <stddef.h>
 
-#include "mojo/public/c/gpu/GLES2/gl2.h"
-
 // Like MojoGLES2ControlThunks, but specifies the frozen GLES2 API. Separated
 // out as MojoGLES2ControlThunks may be modified and added to, but this
 // interface is frozen.
diff --git a/platform/native/mgl_echo_thunks.h b/platform/native/mgl_echo_thunks.h
index a2255d5..df504f6 100644
--- a/platform/native/mgl_echo_thunks.h
+++ b/platform/native/mgl_echo_thunks.h
@@ -5,10 +5,9 @@
 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_
 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_
 
+#include <MGL/mgl_echo.h>
 #include <stddef.h>
 
-#include "mojo/public/c/gpu/MGL/mgl_echo.h"
-
 // Structure used to bind the MGL echo interface DSO to those of the embedder.
 //
 // This is the ABI between the embedder and the DSO. It can only have new
diff --git a/platform/native/mgl_onscreen_thunks.h b/platform/native/mgl_onscreen_thunks.h
index 40dcb80..70cd541 100644
--- a/platform/native/mgl_onscreen_thunks.h
+++ b/platform/native/mgl_onscreen_thunks.h
@@ -5,10 +5,9 @@
 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ONSCREEN_THUNKS_H_
 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ONSCREEN_THUNKS_H_
 
+#include <MGL/mgl_onscreen.h>
 #include <stddef.h>
 
-#include "mojo/public/c/gpu/MGL/mgl_onscreen.h"
-
 // Structure used to bind the interface which manipulates MGL contexts to a
 // DSO to theose of the embedder.
 //
diff --git a/platform/native/mgl_signal_sync_point_thunks.h b/platform/native/mgl_signal_sync_point_thunks.h
index c6f2ebd..c94c7cb 100644
--- a/platform/native/mgl_signal_sync_point_thunks.h
+++ b/platform/native/mgl_signal_sync_point_thunks.h
@@ -5,10 +5,9 @@
 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_SIGNAL_SYNC_POINT_THUNKS_H_
 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_SIGNAL_SYNC_POINT_THUNKS_H_
 
+#include <MGL/mgl_signal_sync_point.h>
 #include <stddef.h>
 
-#include "mojo/public/c/gpu/MGL/mgl_signal_sync_point.h"
-
 // Structure used to bind the MGL signal sync point interface DSO to those
 // of the embedder.
 //
diff --git a/platform/native/mgl_thunks.h b/platform/native/mgl_thunks.h
index 0c4e099..ad815ed 100644
--- a/platform/native/mgl_thunks.h
+++ b/platform/native/mgl_thunks.h
@@ -5,10 +5,9 @@
 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_
 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_
 
+#include <MGL/mgl.h>
 #include <stddef.h>
 
-#include "mojo/public/c/gpu/MGL/mgl.h"
-
 // Structure used to bind the interface which manipulates MGL contexts to a
 // DSO to theose of the embedder.
 //
diff --git a/python/BUILD.gn b/python/BUILD.gn
index 8202e4f..0dd114f 100644
--- a/python/BUILD.gn
+++ b/python/BUILD.gn
@@ -35,7 +35,7 @@
     "../cpp/bindings:callback",
     "../cpp/system",
     "../cpp/utility",
-    "../platform/native:system",
+    "../platform/native:system_thunks",
   ]
   public_deps = [
     "../c:system",
@@ -62,7 +62,7 @@
     "../cpp/environment:standalone",
     "../cpp/system",
     "../cpp/utility",
-    "../platform/native:system",
+    "../platform/native:system_thunks",
   ]
 }