Commit 8849c141 authored by ben@chromium.org's avatar ben@chromium.org

Move geometry to mojo/services, extract input events to their own mojom

R=sky@chromium.org
TBR=sky@chromium.org
http://crbug.com/365012

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273161 0039d316-1c4b-4281-b951-d872f2087c98
parent 3b7f0ac7
......@@ -5,9 +5,9 @@
#include "mojo/aura/window_tree_host_mojo.h"
#include "mojo/aura/context_factory_mojo.h"
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/public/c/gles2/gles2.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
......
......@@ -8,13 +8,13 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "mojo/examples/compositor_app/compositor_host.h"
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/public/cpp/application/application.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/gles2/gles2.h"
#include "mojo/public/cpp/system/core.h"
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "ui/gfx/rect.h"
#if defined(WIN32)
......
......@@ -455,23 +455,6 @@
'spy/websocket_server.h',
],
},
{
'target_name': 'mojo_geometry_lib',
'type': '<(component)',
'defines': [
'MOJO_GEOMETRY_IMPLEMENTATION',
],
'dependencies': [
'../ui/gfx/gfx.gyp:gfx_geometry',
'mojo_environment_chromium',
'mojo_geometry_bindings',
'mojo_system_impl',
],
'sources': [
'geometry/geometry_type_converters.cc',
'geometry/geometry_type_converters.h',
],
},
{
'target_name': 'mojo_shell_lib',
'type': 'static_library',
......
......@@ -349,23 +349,6 @@
'..',
],
},
{
'target_name': 'mojo_geometry_bindings',
'type': 'static_library',
'sources': [
'public/interfaces/geometry/geometry.mojom',
],
'variables': {
'mojom_base_output_dir': 'mojo',
},
'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
'dependencies': [
'mojo_cpp_bindings',
],
'export_dependent_settings': [
'mojo_cpp_bindings',
],
},
{
'target_name': 'mojo_service_provider_bindings',
'type': 'static_library',
......
......@@ -17,6 +17,57 @@
'mojo_cpp_bindings',
],
},
{
'target_name': 'mojo_input_events_bindings',
'type': 'static_library',
'sources': [
'services/public/interfaces/input_events/input_events.mojom',
],
'variables': {
'mojom_base_output_dir': 'mojo',
},
'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
'export_dependent_settings': [
'mojo_cpp_bindings',
],
'dependencies': [
'mojo_cpp_bindings',
],
},
{
'target_name': 'mojo_geometry_bindings',
'type': 'static_library',
'sources': [
'services/public/interfaces/geometry/geometry.mojom',
],
'variables': {
'mojom_base_output_dir': 'mojo',
},
'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
'dependencies': [
'mojo_cpp_bindings',
],
'export_dependent_settings': [
'mojo_cpp_bindings',
],
},
{
'target_name': 'mojo_geometry_lib',
'type': '<(component)',
'defines': [
'MOJO_GEOMETRY_IMPLEMENTATION',
],
'dependencies': [
'../ui/gfx/gfx.gyp:gfx_geometry',
'mojo_environment_chromium',
'mojo_geometry_bindings',
'mojo_system_impl',
],
'sources': [
'services/public/cpp/geometry/lib/geometry_type_converters.cc',
'services/public/cpp/geometry/geometry_type_converters.h',
],
},
{
'target_name': 'mojo_gles2_bindings',
'type': 'static_library',
......@@ -73,6 +124,7 @@
],
'dependencies': [
'mojo_geometry_bindings',
'mojo_input_events_bindings',
'mojo_cpp_bindings',
],
},
......
include_rules = [
"+mojo/geometry",
"+mojo/services/public/cpp/geometry",
"+mojo/services/gles2",
"+ui/events",
"+ui/gfx",
......
......@@ -2,28 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import "../../public/interfaces/geometry/geometry.mojom"
import "../public/interfaces/geometry/geometry.mojom"
import "../public/interfaces/input_events/input_events.mojom"
module mojo {
struct KeyData {
int32 key_code;
bool is_char;
};
struct TouchData {
int32 pointer_id;
};
struct Event {
int32 action;
int32 flags;
int64 time_stamp;
Point location;
KeyData key_data;
TouchData touch_data;
};
[Client=NativeViewportClient]
interface NativeViewport {
Create(Rect bounds);
......
......@@ -7,12 +7,12 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
#include "mojo/services/gles2/command_buffer_impl.h"
#include "mojo/services/native_viewport/native_viewport.h"
#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "ui/events/event.h"
namespace mojo {
......
......@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MOJO_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
#define MOJO_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
#ifndef MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
#define MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
#include "mojo/geometry/mojo_geometry_export.h"
#include "mojo/public/interfaces/geometry/geometry.mojom.h"
#include "mojo/services/public/cpp/geometry/mojo_geometry_export.h"
#include "mojo/services/public/interfaces/geometry/geometry.mojom.h"
#include "ui/gfx/geometry/rect.h"
namespace mojo {
......@@ -40,4 +40,4 @@ class MOJO_GEOMETRY_EXPORT TypeConverter<Rect, gfx::Rect> {
} // namespace mojo
#endif // MOJO_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
#endif // MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
namespace mojo {
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MOJO_GEOMETRY_MOJO_GEOMETRY_EXPORT_H_
#define MOJO_GEOMETRY_MOJO_GEOMETRY_EXPORT_H_
#ifndef MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_MOJO_GEOMETRY_EXPORT_H_
#define MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_MOJO_GEOMETRY_EXPORT_H_
#if defined(COMPONENT_BUILD)
......@@ -29,4 +29,4 @@
#define MOJO_GEOMETRY_EXPORT
#endif
#endif // MOJO_GEOMETRY_MOJO_GEOMETRY_EXPORT_H_
#endif // MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_MOJO_GEOMETRY_EXPORT_H_
......@@ -9,7 +9,7 @@
#include "base/callback.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "mojo/services/public/cpp/view_manager/view_manager_types.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
......
// 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.
import "../geometry/geometry.mojom"
module mojo {
struct KeyData {
int32 key_code;
bool is_char;
};
struct TouchData {
int32 pointer_id;
};
struct Event {
int32 action;
int32 flags;
int64 time_stamp;
Point location;
KeyData key_data;
TouchData touch_data;
};
}
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import "../../../../public/interfaces/geometry/geometry.mojom"
import "../geometry/geometry.mojom"
module mojo.view_manager {
......
......@@ -5,8 +5,8 @@
#include "mojo/services/view_manager/view_manager_connection.h"
#include "base/stl_util.h"
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "mojo/services/view_manager/node.h"
#include "mojo/services/view_manager/root_node_manager.h"
#include "mojo/services/view_manager/view.h"
......
......@@ -11,10 +11,10 @@
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "mojo/common/common_type_converters.h"
#include "mojo/geometry/geometry_type_converters.h"
#include "mojo/public/cpp/application/connect.h"
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "mojo/services/public/cpp/view_manager/util.h"
#include "mojo/services/public/cpp/view_manager/view_manager_types.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment