Rename occlusion_query_ext -> ext_occlusion_query (OcclusionQueryEXT -> EXTOcclusionQuery, etc.).

Keep a thunk setter for the old name (to be deleted when no one uses it
and we've verified it).

R=jamesr@chromium.org
BUG=#353

Review URL: https://codereview.chromium.org/1347823005 .
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 04d2f64..1855b95 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -41,10 +41,10 @@
                             "EXT_debug_marker",
                             "EXT_discard_framebuffer",
                             "EXT_multisampled_render_to_texture",
+                            "EXT_occlusion_query",
                             "EXT_texture_storage",
                             "KHR_blend_equation_advanced",
-                            "OES_vertex_array_object",
-                            "occlusion_query_EXT"]
+                            "OES_vertex_array_object"]
 
 
 # This string is copied directly out of the gl2.h file from GLES2.0
@@ -3416,7 +3416,7 @@
     'unit_test': False,
     'pepper_interface': 'Query',
     'not_shared': 'True',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'DeleteQueriesEXT': {
     'type': 'DELn',
@@ -3425,13 +3425,13 @@
     'resource_types': 'Queries',
     'unit_test': False,
     'pepper_interface': 'Query',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'IsQueryEXT': {
     'gen_cmd': False,
     'client_test': False,
     'pepper_interface': 'Query',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'BeginQueryEXT': {
     'type': 'Manual',
@@ -3439,7 +3439,7 @@
     'data_transfer_methods': ['shm'],
     'gl_test_func': 'glBeginQuery',
     'pepper_interface': 'Query',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'BeginTransformFeedback': {
     'unsafe': True,
@@ -3450,7 +3450,7 @@
     'gl_test_func': 'glEndnQuery',
     'client_test': False,
     'pepper_interface': 'Query',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'EndTransformFeedback': {
     'unsafe': True,
@@ -3460,14 +3460,14 @@
     'client_test': False,
     'gl_test_func': 'glGetQueryiv',
     'pepper_interface': 'Query',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'GetQueryObjectuivEXT': {
     'gen_cmd': False,
     'client_test': False,
     'gl_test_func': 'glGetQueryObjectuiv',
     'pepper_interface': 'Query',
-    'extension': "occlusion_query_EXT",
+    'extension': "EXT_occlusion_query",
   },
   'BindUniformLocationCHROMIUM': {
     'type': 'GLchar',
diff --git a/mojo/gles2/gles2_impl.cc b/mojo/gles2/gles2_impl.cc
index 89b6b25..4049f6d 100644
--- a/mojo/gles2/gles2_impl.cc
+++ b/mojo/gles2/gles2_impl.cc
@@ -25,9 +25,9 @@
 #include "mojo/public/platform/native/gles2/call_visitor_ext_debug_marker_autogen.h"
 #include "mojo/public/platform/native/gles2/call_visitor_ext_discard_framebuffer_autogen.h"
 #include "mojo/public/platform/native/gles2/call_visitor_ext_multisampled_render_to_texture_autogen.h"
+#include "mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h"
 #include "mojo/public/platform/native/gles2/call_visitor_ext_texture_storage_autogen.h"
 #include "mojo/public/platform/native/gles2/call_visitor_khr_blend_equation_advanced_autogen.h"
-#include "mojo/public/platform/native/gles2/call_visitor_occlusion_query_ext_autogen.h"
 #include "mojo/public/platform/native/gles2/call_visitor_oes_vertex_array_object_autogen.h"
 #undef VISIT_GL_CALL
 
diff --git a/mojo/public/platform/native/BUILD.gn b/mojo/public/platform/native/BUILD.gn
index 7c1d349..c4cc43e 100644
--- a/mojo/public/platform/native/BUILD.gn
+++ b/mojo/public/platform/native/BUILD.gn
@@ -80,12 +80,12 @@
     "gles2_impl_ext_discard_framebuffer_thunks.h",
     "gles2_impl_ext_multisampled_render_to_texture_thunks.c",
     "gles2_impl_ext_multisampled_render_to_texture_thunks.h",
+    "gles2_impl_ext_occlusion_query_thunks.c",
+    "gles2_impl_ext_occlusion_query_thunks.h",
     "gles2_impl_ext_texture_storage_thunks.c",
     "gles2_impl_ext_texture_storage_thunks.h",
     "gles2_impl_khr_blend_equation_advanced_thunks.c",
     "gles2_impl_khr_blend_equation_advanced_thunks.h",
-    "gles2_impl_occlusion_query_ext_thunks.c",
-    "gles2_impl_occlusion_query_ext_thunks.h",
     "gles2_impl_oes_vertex_array_object_thunks.c",
     "gles2_impl_oes_vertex_array_object_thunks.h",
     "gles2_impl_thunks.c",
diff --git a/mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h b/mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h
new file mode 100644
index 0000000..b1ccc42
--- /dev/null
+++ b/mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h
@@ -0,0 +1,26 @@
+// Copyright 2014 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.
+
+// This file is auto-generated from
+// gpu/command_buffer/build_gles2_cmd_buffer.py
+// It's formatted by clang-format using chromium coding style:
+//    clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+VISIT_GL_CALL(GenQueriesEXT, void, (GLsizei n, GLuint* queries), (n, queries))
+VISIT_GL_CALL(DeleteQueriesEXT,
+              void,
+              (GLsizei n, const GLuint* queries),
+              (n, queries))
+VISIT_GL_CALL(IsQueryEXT, GLboolean, (GLuint id), (id))
+VISIT_GL_CALL(BeginQueryEXT, void, (GLenum target, GLuint id), (target, id))
+VISIT_GL_CALL(EndQueryEXT, void, (GLenum target), (target))
+VISIT_GL_CALL(GetQueryivEXT,
+              void,
+              (GLenum target, GLenum pname, GLint* params),
+              (target, pname, params))
+VISIT_GL_CALL(GetQueryObjectuivEXT,
+              void,
+              (GLuint id, GLenum pname, GLuint* params),
+              (id, pname, params))
diff --git a/mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.c b/mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.c
new file mode 100644
index 0000000..fbb8b44
--- /dev/null
+++ b/mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.c
@@ -0,0 +1,35 @@
+// Copyright 2014 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.
+
+// This file is auto-generated from
+// gpu/command_buffer/build_gles2_cmd_buffer.py
+// It's formatted by clang-format using chromium coding style:
+//    clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include "mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.h"
+
+#include <assert.h>
+
+#include "mojo/public/platform/native/thunk_export.h"
+
+static struct MojoGLES2ImplEXTOcclusionQueryThunks
+    g_impl_ext_occlusion_query_thunks = {0};
+
+#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
+  ReturnType GL_APIENTRY gl##Function PARAMETERS {                 \
+    assert(g_impl_ext_occlusion_query_thunks.Function);            \
+    return g_impl_ext_occlusion_query_thunks.Function ARGUMENTS;   \
+  }
+#include "mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h"
+#undef VISIT_GL_CALL
+
+THUNK_EXPORT size_t MojoSetGLES2ImplEXTOcclusionQueryThunks(
+    const struct MojoGLES2ImplEXTOcclusionQueryThunks*
+        gles2_impl_ext_occlusion_query_thunks) {
+  if (gles2_impl_ext_occlusion_query_thunks->size >=
+      sizeof(g_impl_ext_occlusion_query_thunks))
+    g_impl_ext_occlusion_query_thunks = *gles2_impl_ext_occlusion_query_thunks;
+  return sizeof(g_impl_ext_occlusion_query_thunks);
+}
diff --git a/mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.h b/mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.h
new file mode 100644
index 0000000..d0ba13f
--- /dev/null
+++ b/mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.h
@@ -0,0 +1,53 @@
+// Copyright 2014 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.
+
+// This file is auto-generated from
+// gpu/command_buffer/build_gles2_cmd_buffer.py
+// It's formatted by clang-format using chromium coding style:
+//    clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_EXT_OCCLUSION_QUERY_THUNKS_H_
+#define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_EXT_OCCLUSION_QUERY_THUNKS_H_
+
+#include <stddef.h>
+
+#define GL_GLEXT_PROTOTYPES
+#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
+
+// Specifies the frozen API for the EXT_occlusion_query extension.
+#pragma pack(push, 8)
+struct MojoGLES2ImplEXTOcclusionQueryThunks {
+  size_t size;  // Should be set to sizeof(*this).
+
+#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
+  ReturnType(GL_APIENTRY* Function) PARAMETERS;
+#include "mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h"
+#undef VISIT_GL_CALL
+};
+#pragma pack(pop)
+
+#ifdef __cplusplus
+// Intended to be called from the embedder to get the embedder's implementation
+// of ext_occlusion_query.
+inline MojoGLES2ImplEXTOcclusionQueryThunks
+MojoMakeGLES2ImplEXTOcclusionQueryThunks() {
+  MojoGLES2ImplEXTOcclusionQueryThunks gles2_impl_ext_occlusion_query_thunks = {
+      sizeof(MojoGLES2ImplEXTOcclusionQueryThunks),
+#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function,
+#include "mojo/public/platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h"
+#undef VISIT_GL_CALL
+  };
+
+  return gles2_impl_ext_occlusion_query_thunks;
+}
+#endif  // __cplusplus
+
+// Use this type for the function found by dynamically discovering it in
+// a DSO linked with mojo_system.
+// The contents of |gles2_impl_ext_occlusion_query_thunks| are copied.
+typedef size_t (*MojoSetGLES2ImplEXTOcclusionQueryThunksFn)(
+    const struct MojoGLES2ImplEXTOcclusionQueryThunks* thunks);
+
+#endif  // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_EXT_OCCLUSION_QUERY_THUNKS_H_
diff --git a/mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.c b/mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.c
deleted file mode 100644
index 400f3ee..0000000
--- a/mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 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.
-
-// This file is auto-generated from
-// gpu/command_buffer/build_gles2_cmd_buffer.py
-// It's formatted by clang-format using chromium coding style:
-//    clang-format -i -style=chromium filename
-// DO NOT EDIT!
-
-#include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h"
-
-#include <assert.h>
-
-#include "mojo/public/platform/native/thunk_export.h"
-
-static struct MojoGLES2ImplOcclusionQueryEXTThunks
-    g_impl_occlusion_query_ext_thunks = {0};
-
-#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
-  ReturnType GL_APIENTRY gl##Function PARAMETERS {                 \
-    assert(g_impl_occlusion_query_ext_thunks.Function);            \
-    return g_impl_occlusion_query_ext_thunks.Function ARGUMENTS;   \
-  }
-#include "mojo/public/platform/native/gles2/call_visitor_occlusion_query_ext_autogen.h"
-#undef VISIT_GL_CALL
-
-THUNK_EXPORT size_t MojoSetGLES2ImplOcclusionQueryEXTThunks(
-    const struct MojoGLES2ImplOcclusionQueryEXTThunks*
-        gles2_impl_occlusion_query_ext_thunks) {
-  if (gles2_impl_occlusion_query_ext_thunks->size >=
-      sizeof(g_impl_occlusion_query_ext_thunks))
-    g_impl_occlusion_query_ext_thunks = *gles2_impl_occlusion_query_ext_thunks;
-  return sizeof(g_impl_occlusion_query_ext_thunks);
-}
diff --git a/mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h b/mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h
deleted file mode 100644
index 326c0b2..0000000
--- a/mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 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.
-
-// This file is auto-generated from
-// gpu/command_buffer/build_gles2_cmd_buffer.py
-// It's formatted by clang-format using chromium coding style:
-//    clang-format -i -style=chromium filename
-// DO NOT EDIT!
-
-#ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_OCCLUSION_QUERY_EXT_THUNKS_H_
-#define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_OCCLUSION_QUERY_EXT_THUNKS_H_
-
-#include <stddef.h>
-
-#define GL_GLEXT_PROTOTYPES
-#include "mojo/public/c/gpu/GLES2/gl2extmojo.h"
-
-// Specifies the frozen API for the occlusion_query_EXT extension.
-#pragma pack(push, 8)
-struct MojoGLES2ImplOcclusionQueryEXTThunks {
-  size_t size;  // Should be set to sizeof(*this).
-
-#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
-  ReturnType(GL_APIENTRY* Function) PARAMETERS;
-#include "mojo/public/platform/native/gles2/call_visitor_occlusion_query_ext_autogen.h"
-#undef VISIT_GL_CALL
-};
-#pragma pack(pop)
-
-#ifdef __cplusplus
-// Intended to be called from the embedder to get the embedder's implementation
-// of occlusion_query_ext.
-inline MojoGLES2ImplOcclusionQueryEXTThunks
-MojoMakeGLES2ImplOcclusionQueryEXTThunks() {
-  MojoGLES2ImplOcclusionQueryEXTThunks gles2_impl_occlusion_query_ext_thunks = {
-      sizeof(MojoGLES2ImplOcclusionQueryEXTThunks),
-#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function,
-#include "mojo/public/platform/native/gles2/call_visitor_occlusion_query_ext_autogen.h"
-#undef VISIT_GL_CALL
-  };
-
-  return gles2_impl_occlusion_query_ext_thunks;
-}
-#endif  // __cplusplus
-
-// Use this type for the function found by dynamically discovering it in
-// a DSO linked with mojo_system.
-// The contents of |gles2_impl_occlusion_query_ext_thunks| are copied.
-typedef size_t (*MojoSetGLES2ImplOcclusionQueryEXTThunksFn)(
-    const struct MojoGLES2ImplOcclusionQueryEXTThunks* thunks);
-
-#endif  // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_OCCLUSION_QUERY_EXT_THUNKS_H_
diff --git a/shell/native_application_support.cc b/shell/native_application_support.cc
index 3bdd197..ce171dc 100644
--- a/shell/native_application_support.cc
+++ b/shell/native_application_support.cc
@@ -16,9 +16,9 @@
 #include "mojo/public/platform/native/gles2_impl_ext_debug_marker_thunks.h"
 #include "mojo/public/platform/native/gles2_impl_ext_discard_framebuffer_thunks.h"
 #include "mojo/public/platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.h"
+#include "mojo/public/platform/native/gles2_impl_ext_occlusion_query_thunks.h"
 #include "mojo/public/platform/native/gles2_impl_ext_texture_storage_thunks.h"
 #include "mojo/public/platform/native/gles2_impl_khr_blend_equation_advanced_thunks.h"
-#include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h"
 #include "mojo/public/platform/native/gles2_impl_oes_vertex_array_object_thunks.h"
 #include "mojo/public/platform/native/gles2_impl_thunks.h"
 #include "mojo/public/platform/native/mgl_onscreen_thunks.h"
@@ -86,6 +86,8 @@
             "MojoSetGLES2ImplEXTDebugMarkerThunks", app_library);
   SetThunks(MojoMakeGLES2ImplEXTDiscardFramebufferThunks,
             "MojoSetGLES2ImplEXTDiscardFramebufferThunks", app_library);
+  SetThunks(MojoMakeGLES2ImplEXTOcclusionQueryThunks,
+            "MojoSetGLES2ImplEXTOcclusionQueryThunks", app_library);
   SetThunks(MojoMakeGLES2ImplEXTTextureStorageThunks,
             "MojoSetGLES2ImplEXTTextureStorageThunks", app_library);
   SetThunks(MojoMakeGLES2ImplEXTMultisampledRenderToTextureThunks,
@@ -93,10 +95,12 @@
             app_library);
   SetThunks(MojoMakeGLES2ImplKHRBlendEquationAdvancedThunks,
             "MojoSetGLES2ImplKHRBlendEquationAdvancedThunks", app_library);
-  SetThunks(MojoMakeGLES2ImplOcclusionQueryEXTThunks,
-            "MojoSetGLES2ImplOcclusionQueryEXTThunks", app_library);
   SetThunks(MojoMakeGLES2ImplOESVertexArrayObjectThunks,
             "MojoSetGLES2ImplOESVertexArrayObjectThunks", app_library);
+  // Deprecated name for "MojoSetGLES2ImplEXTOcclusionQueryThunks" (TODO(vtl):
+  // when no app is using this name any longer, delete it):
+  SetThunks(MojoMakeGLES2ImplEXTOcclusionQueryThunks,
+            "MojoSetGLES2ImplOcclusionQueryEXTThunks", app_library);
   // "Chromium" extensions:
   SetThunks(MojoMakeGLES2ImplCHROMIUMBindUniformLocationThunks,
             "MojoSetGLES2ImplCHROMIUMBindUniformLocationThunks", app_library);