summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 22:07:43 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 22:07:43 +0000
commita4b0f408ac92589d244e6d0ca05309865c5ec5aa (patch)
tree571bf91e0cb5a3a378f79067b3c16a787a7f539d /mojo
parent16dcbb6a94d4d5ac8d1f0761718de38a0eeacd0b (diff)
downloadchromium_src-a4b0f408ac92589d244e6d0ca05309865c5ec5aa.zip
chromium_src-a4b0f408ac92589d244e6d0ca05309865c5ec5aa.tar.gz
chromium_src-a4b0f408ac92589d244e6d0ca05309865c5ec5aa.tar.bz2
Mojo: Include "path/to/foo.mojom.h"
Given path/to/foo.mojom, change the code generator to output: <(SHARED_INTERMEDIATE_DIR)/path/to/foo.mojom.cc <(SHARED_INTERMEDIATE_DIR)/path/to/foo.mojom.h <(SHARED_INTERMEDIATE_DIR)/path/to/foo.mojom-internal.h This involves shelling out to a python script to compute "path/to" part as that is not otherwise available from GYP. See build/inverse_depth.py. DEPTH is now passed to mojom_bindings_generator.py so that it can similarly compute "path/to". With that, we no longer need the include_dir argument, so I dropped it. R=davemoore@chromium.org, mark@chromium.org Review URL: https://codereview.chromium.org/177183002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r--mojo/examples/aura_demo/aura_demo.cc4
-rw-r--r--mojo/examples/aura_demo/window_tree_host_mojo.h2
-rw-r--r--mojo/examples/compositor_app/compositor_app.cc4
-rw-r--r--mojo/examples/launcher/launcher.cc6
-rw-r--r--mojo/examples/sample_app/gles2_client_impl.h2
-rw-r--r--mojo/examples/sample_app/sample_app.cc4
-rw-r--r--mojo/examples/view_manager/view_manager.cc8
-rw-r--r--mojo/gles2/command_buffer_client_impl.h3
-rw-r--r--mojo/mojo_public.gypi2
-rw-r--r--mojo/public/bindings/generators/cpp_templates/module-internal.h.tmpl (renamed from mojo/public/bindings/generators/cpp_templates/module_internal.h.tmpl)6
-rw-r--r--mojo/public/bindings/generators/cpp_templates/module.h.tmpl6
-rw-r--r--mojo/public/bindings/generators/mojom_cpp_generator.py5
-rw-r--r--mojo/public/bindings/mojom_bindings_generator.gypi21
-rwxr-xr-xmojo/public/bindings/mojom_bindings_generator.py18
-rw-r--r--mojo/public/bindings/pylib/generate/mojom.py1
-rw-r--r--mojo/public/bindings/pylib/generate/mojom_generator.py4
-rw-r--r--mojo/public/bindings/tests/handle_passing_unittest.cc2
-rw-r--r--mojo/public/bindings/tests/remote_ptr_unittest.cc4
-rw-r--r--mojo/public/bindings/tests/sample_service_unittest.cc2
-rw-r--r--mojo/public/bindings/tests/type_conversion_unittest.cc2
-rw-r--r--mojo/public/shell/application.h2
-rw-r--r--mojo/public/shell/service.h2
-rw-r--r--mojo/public/shell/shell.mojom (renamed from mojo/public/shell/lib/shell.mojom)0
-rw-r--r--mojo/services/gles2/command_buffer_impl.h2
-rw-r--r--mojo/services/gles2/command_buffer_type_conversions.cc2
-rw-r--r--mojo/services/native_viewport/geometry_conversions.h2
-rw-r--r--mojo/services/native_viewport/native_viewport_service.cc4
-rw-r--r--mojo/shell/dynamic_service_loader.cc1
-rw-r--r--mojo/shell/dynamic_service_loader.h2
-rw-r--r--mojo/shell/service_manager.cc1
-rw-r--r--mojo/shell/service_manager.h2
-rw-r--r--mojo/shell/service_manager_unittest.cc4
32 files changed, 68 insertions, 62 deletions
diff --git a/mojo/examples/aura_demo/aura_demo.cc b/mojo/examples/aura_demo/aura_demo.cc
index 463b757..7e2ec77 100644
--- a/mojo/examples/aura_demo/aura_demo.cc
+++ b/mojo/examples/aura_demo/aura_demo.cc
@@ -13,10 +13,10 @@
#include "mojo/public/bindings/allocation_scope.h"
#include "mojo/public/gles2/gles2_cpp.h"
#include "mojo/public/shell/application.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core.h"
#include "mojo/public/system/macros.h"
-#include "mojom/native_viewport.h"
-#include "mojom/shell.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/env.h"
diff --git a/mojo/examples/aura_demo/window_tree_host_mojo.h b/mojo/examples/aura_demo/window_tree_host_mojo.h
index 11eaadd..62cf89e 100644
--- a/mojo/examples/aura_demo/window_tree_host_mojo.h
+++ b/mojo/examples/aura_demo/window_tree_host_mojo.h
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "mojo/public/bindings/remote_ptr.h"
-#include "mojom/native_viewport.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/event_source.h"
#include "ui/gfx/rect.h"
diff --git a/mojo/examples/compositor_app/compositor_app.cc b/mojo/examples/compositor_app/compositor_app.cc
index 05ffa71..468ffa5 100644
--- a/mojo/examples/compositor_app/compositor_app.cc
+++ b/mojo/examples/compositor_app/compositor_app.cc
@@ -11,11 +11,11 @@
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/gles2/gles2_cpp.h"
#include "mojo/public/shell/application.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core.h"
#include "mojo/public/system/macros.h"
#include "mojo/services/native_viewport/geometry_conversions.h"
-#include "mojom/native_viewport.h"
-#include "mojom/shell.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/gfx/rect.h"
#if defined(WIN32)
diff --git a/mojo/examples/launcher/launcher.cc b/mojo/examples/launcher/launcher.cc
index 43addf4..5e19f84 100644
--- a/mojo/examples/launcher/launcher.cc
+++ b/mojo/examples/launcher/launcher.cc
@@ -13,15 +13,15 @@
#include "base/path_service.h"
#include "mojo/examples/aura_demo/demo_screen.h"
#include "mojo/examples/aura_demo/window_tree_host_mojo.h"
+#include "mojo/examples/launcher/launcher.mojom.h"
#include "mojo/public/bindings/allocation_scope.h"
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/gles2/gles2_cpp.h"
#include "mojo/public/shell/application.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core.h"
#include "mojo/public/system/macros.h"
-#include "mojom/launcher.h"
-#include "mojom/native_viewport.h"
-#include "mojom/shell.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/default_activation_client.h"
#include "ui/aura/client/default_capture_client.h"
diff --git a/mojo/examples/sample_app/gles2_client_impl.h b/mojo/examples/sample_app/gles2_client_impl.h
index 9833e2a..759140f 100644
--- a/mojo/examples/sample_app/gles2_client_impl.h
+++ b/mojo/examples/sample_app/gles2_client_impl.h
@@ -8,7 +8,7 @@
#include "mojo/examples/sample_app/spinning_cube.h"
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/gles2/gles2.h"
-#include "mojom/native_viewport.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/gfx/point_f.h"
#include "ui/gfx/size.h"
diff --git a/mojo/examples/sample_app/sample_app.cc b/mojo/examples/sample_app/sample_app.cc
index 07e74c4..6c078e1 100644
--- a/mojo/examples/sample_app/sample_app.cc
+++ b/mojo/examples/sample_app/sample_app.cc
@@ -11,11 +11,11 @@
#include "mojo/public/environment/environment.h"
#include "mojo/public/gles2/gles2_cpp.h"
#include "mojo/public/shell/application.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core.h"
#include "mojo/public/system/macros.h"
#include "mojo/public/utility/run_loop.h"
-#include "mojom/native_viewport.h"
-#include "mojom/shell.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#if defined(WIN32)
#if !defined(CDECL)
diff --git a/mojo/examples/view_manager/view_manager.cc b/mojo/examples/view_manager/view_manager.cc
index 4c38dc3..69e5936 100644
--- a/mojo/examples/view_manager/view_manager.cc
+++ b/mojo/examples/view_manager/view_manager.cc
@@ -7,16 +7,16 @@
#include "base/logging.h"
#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
+#include "mojo/examples/launcher/launcher.mojom.h"
+#include "mojo/examples/view_manager/view_manager.mojom.h"
#include "mojo/public/bindings/allocation_scope.h"
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/shell/application.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core.h"
#include "mojo/public/system/macros.h"
#include "mojo/services/native_viewport/geometry_conversions.h"
-#include "mojom/launcher.h"
-#include "mojom/native_viewport.h"
-#include "mojom/shell.h"
-#include "mojom/view_manager.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/rect.h"
diff --git a/mojo/gles2/command_buffer_client_impl.h b/mojo/gles2/command_buffer_client_impl.h
index ab5fed3..cd17861 100644
--- a/mojo/gles2/command_buffer_client_impl.h
+++ b/mojo/gles2/command_buffer_client_impl.h
@@ -13,10 +13,9 @@
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/command_buffer_shared.h"
#include "gpu/command_buffer/common/gpu_control.h"
-
#include "mojo/public/bindings/error_handler.h"
#include "mojo/public/bindings/remote_ptr.h"
-#include "mojom/command_buffer.h"
+#include "mojo/services/gles2/command_buffer.mojom.h"
namespace base {
class RunLoop;
diff --git a/mojo/mojo_public.gypi b/mojo/mojo_public.gypi
index 21dcd0f..b4ad543 100644
--- a/mojo/mojo_public.gypi
+++ b/mojo/mojo_public.gypi
@@ -294,10 +294,10 @@
'type': 'static_library',
'sources': [
'public/shell/lib/application.cc',
- 'public/shell/lib/shell.mojom',
'public/shell/lib/service.cc',
'public/shell/application.h',
'public/shell/service.h',
+ 'public/shell/shell.mojom',
],
'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
'export_dependent_settings': [
diff --git a/mojo/public/bindings/generators/cpp_templates/module_internal.h.tmpl b/mojo/public/bindings/generators/cpp_templates/module-internal.h.tmpl
index 6d483df..22236c0 100644
--- a/mojo/public/bindings/generators/cpp_templates/module_internal.h.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/module-internal.h.tmpl
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-{%- set header_guard = "MOJO_GENERATED_BINDINGS_%s_%s_INTERNAL_H_"|
- format(module_name|upper, module_name|upper) %}
+{%- set header_guard = "%s_INTERNAL_H_"|
+ format(module_name|upper|replace("/","_")|replace(".","_")) %}
#ifndef {{header_guard}}
#define {{header_guard}}
#include "mojo/public/bindings/lib/bindings_internal.h"
{%- for import in imports %}
-#include "{{include_prefix}}{{import.module_name|camel_to_underscores}}_internal.h"
+#include "{{include_prefix}}{{import.module_name|camel_to_underscores}}-internal.h"
{%- endfor %}
namespace {{namespace}} {
diff --git a/mojo/public/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/bindings/generators/cpp_templates/module.h.tmpl
index ad22921..ca5aee8 100644
--- a/mojo/public/bindings/generators/cpp_templates/module.h.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/module.h.tmpl
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-{%- set header_guard = "MOJO_GENERATED_BINDINGS_%s_%s_H_"|
- format(module_name|upper, module_name|upper) %}
+{%- set header_guard = "%s_H_"|
+ format(module_path|upper|replace("/","_")|replace(".","_")) %}
#ifndef {{header_guard}}
#define {{header_guard}}
#include "mojo/public/bindings/array.h"
#include "mojo/public/bindings/interface.h"
-#include "{{include_prefix}}{{module_name|camel_to_underscores}}_internal.h"
+#include "{{include_prefix}}{{module_name|camel_to_underscores}}-internal.h"
{%- for import in imports %}
#include "{{include_prefix}}{{import.module_name|camel_to_underscores}}.h"
{%- endfor %}
diff --git a/mojo/public/bindings/generators/mojom_cpp_generator.py b/mojo/public/bindings/generators/mojom_cpp_generator.py
index 4420aaf..dcff240 100644
--- a/mojo/public/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/bindings/generators/mojom_cpp_generator.py
@@ -141,6 +141,7 @@ class Generator(mojom_generator.Generator):
return {
"module": self.module,
"module_name": self.module.name,
+ "module_path": self.module.path,
"namespace": self.module.namespace,
"imports": self.module.imports,
"kinds": self.module.kinds,
@@ -154,7 +155,7 @@ class Generator(mojom_generator.Generator):
def GenerateModuleHeader(self):
return self.GetJinjaExports()
- @UseJinja("cpp_templates/module_internal.h.tmpl", filters=cpp_filters)
+ @UseJinja("cpp_templates/module-internal.h.tmpl", filters=cpp_filters)
def GenerateModuleInternalHeader(self):
return self.GetJinjaExports()
@@ -165,7 +166,7 @@ class Generator(mojom_generator.Generator):
def GenerateFiles(self):
self.Write(self.GenerateModuleHeader(), "%s.h" % self.module.name)
self.Write(self.GenerateModuleInternalHeader(),
- "%s_internal.h" % self.module.name)
+ "%s-internal.h" % self.module.name)
self.Write(self.GenerateModuleSource(), "%s.cc" % self.module.name)
def GetIncludePrefix(self):
diff --git a/mojo/public/bindings/mojom_bindings_generator.gypi b/mojo/public/bindings/mojom_bindings_generator.gypi
index c72b9c0..2b7554a 100644
--- a/mojo/public/bindings/mojom_bindings_generator.gypi
+++ b/mojo/public/bindings/mojom_bindings_generator.gypi
@@ -3,14 +3,13 @@
# found in the LICENSE file.
{
- 'variables': {
- 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/mojom',
- },
'rules': [
{
'rule_name': 'Generate C++ source files from mojom files',
'extension': 'mojom',
'variables': {
+ 'mojom_base_output_dir':
+ '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))',
'mojom_bindings_generator':
'<(DEPTH)/mojo/public/bindings/mojom_bindings_generator.py',
},
@@ -23,7 +22,7 @@
'<(DEPTH)/mojo/public/bindings/generators/cpp_templates/interface_stub_declaration.tmpl',
'<(DEPTH)/mojo/public/bindings/generators/cpp_templates/module.cc.tmpl',
'<(DEPTH)/mojo/public/bindings/generators/cpp_templates/module.h.tmpl',
- '<(DEPTH)/mojo/public/bindings/generators/cpp_templates/module_internal.h.tmpl',
+ '<(DEPTH)/mojo/public/bindings/generators/cpp_templates/module-internal.h.tmpl',
'<(DEPTH)/mojo/public/bindings/generators/cpp_templates/params_definition.tmpl',
'<(DEPTH)/mojo/public/bindings/generators/cpp_templates/struct_builder_definition.tmpl',
'<(DEPTH)/mojo/public/bindings/generators/cpp_templates/struct_declaration.tmpl',
@@ -49,18 +48,18 @@
'<(DEPTH)/mojo/public/bindings/pylib/generate/template_expander.py',
],
'outputs': [
- '<(output_dir)/<(RULE_INPUT_ROOT).cc',
- '<(output_dir)/<(RULE_INPUT_ROOT).h',
- '<(output_dir)/<(RULE_INPUT_ROOT).js',
- '<(output_dir)/<(RULE_INPUT_ROOT)_internal.h',
+ '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_PATH).cc',
+ '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_PATH).h',
+ '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_PATH).js',
+ '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_PATH)-internal.h',
],
'action': [
'python', '<@(mojom_bindings_generator)',
'<(RULE_INPUT_PATH)',
- '-i', 'mojom',
- '-o', '<(output_dir)',
+ '-d', '<(DEPTH)',
+ '-o', '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)',
],
- 'message': 'Generating C++ from mojom <(RULE_INPUT_PATH)',
+ 'message': 'Generating C++ from <(RULE_INPUT_PATH)',
'process_outputs_as_sources': 1,
}
],
diff --git a/mojo/public/bindings/mojom_bindings_generator.py b/mojo/public/bindings/mojom_bindings_generator.py
index 87b055d..7c05a82 100755
--- a/mojo/public/bindings/mojom_bindings_generator.py
+++ b/mojo/public/bindings/mojom_bindings_generator.py
@@ -44,6 +44,7 @@ def LoadGenerators(generators_string):
generators.append(generator_module)
return generators
+
def ProcessFile(args, generator_modules, filename, processed_files):
# Ensure we only visit each file once.
if filename in processed_files:
@@ -53,7 +54,6 @@ def ProcessFile(args, generator_modules, filename, processed_files):
processed_files[filename] = None
dirname, name = os.path.split(filename)
- name = os.path.splitext(name)[0]
# TODO(darin): There's clearly too many layers of translation here! We can
# at least avoid generating the serialized Mojom IR.
tree = mojo_parser.Parse(filename)
@@ -69,21 +69,29 @@ def ProcessFile(args, generator_modules, filename, processed_files):
args, generator_modules, import_filename, processed_files)
module = mojom_data.OrderedModuleFromData(mojom)
+
+ # Set the path as relative to the source root.
+ module.path = os.path.relpath(os.path.abspath(filename),
+ os.path.abspath(args.depth))
+
+ # Normalize to unix-style path here to keep the generators simpler.
+ module.path = module.path.replace('\\', '/')
+
for generator_module in generator_modules:
- generator = generator_module.Generator(module, args.include_dir,
- args.output_dir)
+ generator = generator_module.Generator(module, args.output_dir)
generator.GenerateFiles()
processed_files[filename] = module
return module
+
def Main():
parser = argparse.ArgumentParser(
description="Generate bindings from mojom files.")
parser.add_argument("filename", nargs="+",
help="mojom input file")
- parser.add_argument("-i", "--include_dir", dest="include_dir", default=".",
- help="include path for #includes")
+ parser.add_argument("-d", "--depth", dest="depth", default=".",
+ help="depth from source root")
parser.add_argument("-o", "--output_dir", dest="output_dir", default=".",
help="output directory for generated files")
parser.add_argument("-g", "--generators", dest="generators_string",
diff --git a/mojo/public/bindings/pylib/generate/mojom.py b/mojo/public/bindings/pylib/generate/mojom.py
index 4e8ef13..7cb7518 100644
--- a/mojo/public/bindings/pylib/generate/mojom.py
+++ b/mojo/public/bindings/pylib/generate/mojom.py
@@ -166,6 +166,7 @@ class Enum(object):
class Module(object):
def __init__(self, name = None, namespace = None):
self.name = name
+ self.path = name
self.namespace = namespace
self.structs = []
self.interfaces = []
diff --git a/mojo/public/bindings/pylib/generate/mojom_generator.py b/mojo/public/bindings/pylib/generate/mojom_generator.py
index 1148764..cf3a84f 100644
--- a/mojo/public/bindings/pylib/generate/mojom_generator.py
+++ b/mojo/public/bindings/pylib/generate/mojom_generator.py
@@ -64,9 +64,9 @@ def ExpressionMapper(expression, mapper):
class Generator(object):
# Pass |output_dir| to emit files to disk. Omit |output_dir| to echo all
# files to stdout.
- def __init__(self, module, header_dir, output_dir=None):
+ def __init__(self, module, output_dir=None):
self.module = module
- self.header_dir = header_dir
+ self.header_dir = os.path.dirname(module.path);
self.output_dir = output_dir
def GetStructsFromMethods(self):
diff --git a/mojo/public/bindings/tests/handle_passing_unittest.cc b/mojo/public/bindings/tests/handle_passing_unittest.cc
index d49adf2..60e1d9b 100644
--- a/mojo/public/bindings/tests/handle_passing_unittest.cc
+++ b/mojo/public/bindings/tests/handle_passing_unittest.cc
@@ -4,10 +4,10 @@
#include "mojo/public/bindings/allocation_scope.h"
#include "mojo/public/bindings/remote_ptr.h"
+#include "mojo/public/bindings/tests/sample_factory.mojom.h"
#include "mojo/public/environment/environment.h"
#include "mojo/public/tests/test_utils.h"
#include "mojo/public/utility/run_loop.h"
-#include "mojom/sample_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/public/bindings/tests/remote_ptr_unittest.cc b/mojo/public/bindings/tests/remote_ptr_unittest.cc
index 4853ee0..b4f02cd 100644
--- a/mojo/public/bindings/tests/remote_ptr_unittest.cc
+++ b/mojo/public/bindings/tests/remote_ptr_unittest.cc
@@ -4,10 +4,10 @@
#include "mojo/public/bindings/error_handler.h"
#include "mojo/public/bindings/remote_ptr.h"
+#include "mojo/public/bindings/tests/math_calculator.mojom.h"
+#include "mojo/public/bindings/tests/sample_service.mojom.h"
#include "mojo/public/environment/environment.h"
#include "mojo/public/utility/run_loop.h"
-#include "mojom/math_calculator.h"
-#include "mojom/sample_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/public/bindings/tests/sample_service_unittest.cc b/mojo/public/bindings/tests/sample_service_unittest.cc
index 4c8a9a0..877f336 100644
--- a/mojo/public/bindings/tests/sample_service_unittest.cc
+++ b/mojo/public/bindings/tests/sample_service_unittest.cc
@@ -7,8 +7,8 @@
#include <string>
#include "mojo/public/bindings/allocation_scope.h"
+#include "mojo/public/bindings/tests/sample_service.mojom.h"
#include "mojo/public/environment/environment.h"
-#include "mojom/sample_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/public/bindings/tests/type_conversion_unittest.cc b/mojo/public/bindings/tests/type_conversion_unittest.cc
index 723d036..49772e1 100644
--- a/mojo/public/bindings/tests/type_conversion_unittest.cc
+++ b/mojo/public/bindings/tests/type_conversion_unittest.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "mojo/public/bindings/allocation_scope.h"
+#include "mojo/public/bindings/tests/test_structs.mojom.h"
#include "mojo/public/environment/environment.h"
-#include "mojom/test_structs.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
diff --git a/mojo/public/shell/application.h b/mojo/public/shell/application.h
index 34aac68..c4707c0 100644
--- a/mojo/public/shell/application.h
+++ b/mojo/public/shell/application.h
@@ -9,8 +9,8 @@
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/shell/service.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core_cpp.h"
-#include "mojom/shell.h"
namespace mojo {
diff --git a/mojo/public/shell/service.h b/mojo/public/shell/service.h
index bd3b0af..490eef2 100644
--- a/mojo/public/shell/service.h
+++ b/mojo/public/shell/service.h
@@ -9,8 +9,8 @@
#include "mojo/public/bindings/error_handler.h"
#include "mojo/public/bindings/remote_ptr.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core_cpp.h"
-#include "mojom/shell.h"
// Utility classes for creating ShellClients that vend service instances.
// To use define a class that implements your specific server api, e.g. FooImpl
diff --git a/mojo/public/shell/lib/shell.mojom b/mojo/public/shell/shell.mojom
index 39eae78..39eae78 100644
--- a/mojo/public/shell/lib/shell.mojom
+++ b/mojo/public/shell/shell.mojom
diff --git a/mojo/services/gles2/command_buffer_impl.h b/mojo/services/gles2/command_buffer_impl.h
index 25298d1..6f2776d 100644
--- a/mojo/services/gles2/command_buffer_impl.h
+++ b/mojo/services/gles2/command_buffer_impl.h
@@ -9,7 +9,7 @@
#include "base/timer/timer.h"
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/system/core_cpp.h"
-#include "mojom/command_buffer.h"
+#include "mojo/services/gles2/command_buffer.mojom.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
diff --git a/mojo/services/gles2/command_buffer_type_conversions.cc b/mojo/services/gles2/command_buffer_type_conversions.cc
index a39feb5..ccde8f0 100644
--- a/mojo/services/gles2/command_buffer_type_conversions.cc
+++ b/mojo/services/gles2/command_buffer_type_conversions.cc
@@ -6,7 +6,7 @@
#include <string.h>
-#include "mojom/command_buffer.h"
+#include "mojo/services/gles2/command_buffer.mojom.h"
namespace mojo {
diff --git a/mojo/services/native_viewport/geometry_conversions.h b/mojo/services/native_viewport/geometry_conversions.h
index 505674b..d459598 100644
--- a/mojo/services/native_viewport/geometry_conversions.h
+++ b/mojo/services/native_viewport/geometry_conversions.h
@@ -5,7 +5,7 @@
#ifndef MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_
#define MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_
-#include "mojom/native_viewport.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/gfx/rect.h"
namespace mojo {
diff --git a/mojo/services/native_viewport/native_viewport_service.cc b/mojo/services/native_viewport/native_viewport_service.cc
index 8b6a34b..5db656e 100644
--- a/mojo/services/native_viewport/native_viewport_service.cc
+++ b/mojo/services/native_viewport/native_viewport_service.cc
@@ -7,11 +7,11 @@
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
#include "mojo/public/bindings/allocation_scope.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/services/gles2/command_buffer_impl.h"
#include "mojo/services/native_viewport/geometry_conversions.h"
#include "mojo/services/native_viewport/native_viewport.h"
-#include "mojom/native_viewport.h"
-#include "mojom/shell.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/events/event.h"
namespace mojo {
diff --git a/mojo/shell/dynamic_service_loader.cc b/mojo/shell/dynamic_service_loader.cc
index 4c62dd9..4168fdf 100644
--- a/mojo/shell/dynamic_service_loader.cc
+++ b/mojo/shell/dynamic_service_loader.cc
@@ -12,7 +12,6 @@
#include "mojo/shell/context.h"
#include "mojo/shell/keep_alive.h"
#include "mojo/shell/switches.h"
-#include "mojom/shell.h"
typedef MojoResult (*MojoMainFunction)(MojoHandle pipe);
diff --git a/mojo/shell/dynamic_service_loader.h b/mojo/shell/dynamic_service_loader.h
index aef76df..bdb995c 100644
--- a/mojo/shell/dynamic_service_loader.h
+++ b/mojo/shell/dynamic_service_loader.h
@@ -8,10 +8,10 @@
#include <map>
#include "base/basictypes.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core_cpp.h"
#include "mojo/shell/keep_alive.h"
#include "mojo/shell/service_manager.h"
-#include "mojom/shell.h"
#include "url/gurl.h"
namespace mojo {
diff --git a/mojo/shell/service_manager.cc b/mojo/shell/service_manager.cc
index 97a0d51..15146a8 100644
--- a/mojo/shell/service_manager.cc
+++ b/mojo/shell/service_manager.cc
@@ -8,7 +8,6 @@
#include "mojo/public/bindings/allocation_scope.h"
#include "mojo/public/bindings/error_handler.h"
#include "mojo/public/bindings/remote_ptr.h"
-#include "mojom/shell.h"
namespace mojo {
namespace shell {
diff --git a/mojo/shell/service_manager.h b/mojo/shell/service_manager.h
index b21393a..fa396c7 100644
--- a/mojo/shell/service_manager.h
+++ b/mojo/shell/service_manager.h
@@ -9,8 +9,8 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/system/core_cpp.h"
-#include "mojom/shell.h"
#include "url/gurl.h"
namespace mojo {
diff --git a/mojo/shell/service_manager_unittest.cc b/mojo/shell/service_manager_unittest.cc
index ac5d1ba..0f17b1d 100644
--- a/mojo/shell/service_manager_unittest.cc
+++ b/mojo/shell/service_manager_unittest.cc
@@ -6,10 +6,10 @@
#include "mojo/public/bindings/remote_ptr.h"
#include "mojo/public/environment/environment.h"
#include "mojo/public/shell/application.h"
+#include "mojo/public/shell/shell.mojom.h"
#include "mojo/public/utility/run_loop.h"
#include "mojo/shell/service_manager.h"
-#include "mojom/shell.h"
-#include "mojom/test.h"
+#include "mojo/shell/test.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {