diff options
author | scottmg@google.com <scottmg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 21:25:12 +0000 |
---|---|---|
committer | scottmg@google.com <scottmg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 21:25:12 +0000 |
commit | 56deedeafb9d4880280e33a4d35e769a4c119cf2 (patch) | |
tree | 54fc3c6b34e33dc4ade1c11c3355d39e52b1563c /ui/metro_viewer | |
parent | 9d68072cff1c7d2e94ea2d35026f5cdd0736a3de (diff) | |
download | chromium_src-56deedeafb9d4880280e33a4d35e769a4c119cf2.zip chromium_src-56deedeafb9d4880280e33a4d35e769a4c119cf2.tar.gz chromium_src-56deedeafb9d4880280e33a4d35e769a4c119cf2.tar.bz2 |
Listen in the browser for a connection from a metro viewer process.
Render to the surface it provides to us.
BUG=151718
Review URL: https://codereview.chromium.org/10984007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/metro_viewer')
-rw-r--r-- | ui/metro_viewer/metro_viewer.gyp | 28 | ||||
-rw-r--r-- | ui/metro_viewer/metro_viewer_message_generator.cc | 33 | ||||
-rw-r--r-- | ui/metro_viewer/metro_viewer_message_generator.h | 7 | ||||
-rw-r--r-- | ui/metro_viewer/metro_viewer_messages.h | 22 |
4 files changed, 90 insertions, 0 deletions
diff --git a/ui/metro_viewer/metro_viewer.gyp b/ui/metro_viewer/metro_viewer.gyp new file mode 100644 index 0000000..a9436d6 --- /dev/null +++ b/ui/metro_viewer/metro_viewer.gyp @@ -0,0 +1,28 @@ +# Copyright (c) 2012 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. + +{ + 'variables': { + 'chromium_code': 1, + }, + 'targets': [ + { + 'target_name': 'metro_viewer', + 'type': 'static_library', + 'dependencies': [ + '../../base/base.gyp:base', + '../../skia/skia.gyp:skia', + ], + 'sources': [ + 'metro_viewer_message_generator.cc', + 'metro_viewer_message_generator.h', + 'metro_viewer_messages.h', + ], + 'include_dirs': [ + '..', + ], + }, + ], +} + diff --git a/ui/metro_viewer/metro_viewer_message_generator.cc b/ui/metro_viewer/metro_viewer_message_generator.cc new file mode 100644 index 0000000..360321c --- /dev/null +++ b/ui/metro_viewer/metro_viewer_message_generator.cc @@ -0,0 +1,33 @@ +// Copyright (c) 2012 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. + +// Get basic type definitions. +#define IPC_MESSAGE_IMPL +#include "ui/metro_viewer/metro_viewer_message_generator.h" + +// Generate constructors. +#include "ipc/struct_constructor_macros.h" +#include "ui/metro_viewer/metro_viewer_message_generator.h" + +// Generate destructors. +#include "ipc/struct_destructor_macros.h" +#include "ui/metro_viewer/metro_viewer_message_generator.h" + +// Generate param traits write methods. +#include "ipc/param_traits_write_macros.h" +namespace IPC { +#include "ui/metro_viewer/metro_viewer_message_generator.h" +} // namespace IPC + +// Generate param traits read methods. +#include "ipc/param_traits_read_macros.h" +namespace IPC { +#include "ui/metro_viewer/metro_viewer_message_generator.h" +} // namespace IPC + +// Generate param traits log methods. +#include "ipc/param_traits_log_macros.h" +namespace IPC { +#include "ui/metro_viewer/metro_viewer_message_generator.h" +} // namespace IPC diff --git a/ui/metro_viewer/metro_viewer_message_generator.h b/ui/metro_viewer/metro_viewer_message_generator.h new file mode 100644 index 0000000..4ea8688 --- /dev/null +++ b/ui/metro_viewer/metro_viewer_message_generator.h @@ -0,0 +1,7 @@ +// Copyright (c) 2012 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. + +// Multiply-included file, hence no include guard. + +#include "ui/metro_viewer/metro_viewer_messages.h" diff --git a/ui/metro_viewer/metro_viewer_messages.h b/ui/metro_viewer/metro_viewer_messages.h new file mode 100644 index 0000000..776e06b --- /dev/null +++ b/ui/metro_viewer/metro_viewer_messages.h @@ -0,0 +1,22 @@ +// Copyright 2012 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. + +// Multiply-included message file, no include guard. + +#include "base/basictypes.h" +#include "ipc/ipc_message_macros.h" +#include "ui/gfx/native_widget_types.h" + +#define IPC_MESSAGE_START MetroViewerMsgStart + +// Messages sent from the viewer to the browser. + +// Inform the browser of the surface to target for compositing. +IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_SetTargetSurface, + gfx::NativeViewId /* target hwnd */) + +IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_MouseEvent, + int, /* msg */ + uintptr_t, /* message's wParam */ + intptr_t /* message's lParam */) |