summaryrefslogtreecommitdiffstats
path: root/chrome/common/gpu_native_window_handle.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-08-06 12:13:06 +0100
committerBen Murdoch <benm@google.com>2010-08-18 15:49:13 +0100
commit06741cbc25cd4227a9fba40dfd0273bfcc1a587a (patch)
treeca6f21dec86a8c4f6d3c50e78628c0cf31da0353 /chrome/common/gpu_native_window_handle.h
parentaa0bf16ed53445f227734aee4274c7aef056f032 (diff)
downloadexternal_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.zip
external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.tar.gz
external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.tar.bz2
Add chrome/common @ 52593
Needed by autofill Change-Id: Ibfea9ab92382af0bd0cfc6e94d21e4baa4b9d896
Diffstat (limited to 'chrome/common/gpu_native_window_handle.h')
-rw-r--r--chrome/common/gpu_native_window_handle.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome/common/gpu_native_window_handle.h b/chrome/common/gpu_native_window_handle.h
new file mode 100644
index 0000000..11e8cda
--- /dev/null
+++ b/chrome/common/gpu_native_window_handle.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 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.
+
+#ifndef CHROME_COMMON_GPU_NATIVE_WINDOW_HANDLE_H_
+#define CHROME_COMMON_GPU_NATIVE_WINDOW_HANDLE_H_
+
+#include "build/build_config.h"
+
+// This file defines the window handle type used by the GPU process IPC layer.
+// This is different than gfx::NativeWindow[Id] since on X, this is an XID.
+// Normally, Chrome deals with either GTK window pointers, or magic window
+// IDs that the app generates. The GPU process needs to know the real XID.
+
+#if defined(OS_WIN)
+
+#include <windows.h>
+
+typedef HWND GpuNativeWindowHandle;
+
+#elif defined(OS_MACOSX)
+
+// The GPU process isn't supported on Mac yet. Defining this arbitrarily allows
+// us to not worry about the integration points not compiling.
+typedef int GpuNativeWindowHandle;
+
+#elif defined(USE_X11)
+
+// Forward declar XID ourselves to avoid pulling in all of the X headers, which
+// can cause compile problems for some parts of the project.
+typedef unsigned long XID;
+
+typedef XID GpuNativeWindowHandle;
+
+#else
+
+#error define GpuNativeWindowHandle
+
+#endif
+
+#endif // CHROME_COMMON_GPU_NATIVE_WINDOW_HANDLE_H_