Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4026)

Unified Diff: chrome/common/render_messages.h

Issue 19491: POSIX: bitmap data on the wire (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/bitmap_wire_data.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
===================================================================
--- chrome/common/render_messages.h (revision 9053)
+++ chrome/common/render_messages.h (working copy)
@@ -10,8 +10,10 @@
#include <map>
#include "base/basictypes.h"
+#include "base/gfx/native_widget_types.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
+#include "chrome/common/bitmap_wire_data.h"
#include "chrome/common/filter_policy.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/ipc_message_utils.h"
@@ -33,6 +35,10 @@
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview_delegate.h"
+#if defined(OS_POSIX)
+#include "skia/include/SkBitmap.h"
+#endif
+
// Parameters structure for ViewMsg_Navigate, which has too many data
// parameters to be reasonably put in a predefined IPC message.
struct ViewMsg_Navigate_Params {
@@ -190,13 +196,9 @@
}
};
-#if defined(OS_WIN)
-// TODO(port): Make these structs portable.
-
struct ViewHostMsg_PaintRect_Params {
- // The bitmap to be painted into the rect given by bitmap_rect. Valid only
- // in the context of the renderer process.
- base::SharedMemoryHandle bitmap;
+ // The bitmap to be painted into the rect given by bitmap_rect.
+ BitmapWireData bitmap;
// The position and size of the bitmap.
gfx::Rect bitmap_rect;
@@ -228,9 +230,8 @@
// Parameters structure for ViewHostMsg_ScrollRect, which has too many data
// parameters to be reasonably put in a predefined IPC message.
struct ViewHostMsg_ScrollRect_Params {
- // The bitmap to be painted into the rect exposed by scrolling. This handle
- // is valid only in the context of the renderer process.
- base::SharedMemoryHandle bitmap;
+ // The bitmap to be painted into the rect exposed by scrolling.
+ BitmapWireData bitmap;
// The position and size of the bitmap.
gfx::Rect bitmap_rect;
@@ -248,7 +249,6 @@
// New window locations for plugin child windows.
std::vector<WebPluginGeometry> plugin_window_moves;
};
-#endif // defined(OS_WIN)
// Parameters structure for ViewMsg_UploadFile.
struct ViewMsg_UploadFile_Params {
@@ -967,9 +967,6 @@
}
};
-#if defined(OS_WIN)
-// TODO(port): Make these messages portable.
-
// Traits for ViewHostMsg_PaintRect_Params structure to pack/unpack.
template <>
struct ParamTraits<ViewHostMsg_PaintRect_Params> {
@@ -1078,7 +1075,6 @@
l->append(L")");
}
};
-#endif // defined(OS_WIN)
// Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack.
template <>
@@ -1738,6 +1734,31 @@
}
};
+#if defined(OS_POSIX)
+
+// TODO(port): this shouldn't exist. However, the plugin stuff is really using
+// HWNDS (NativeView), and making Windows calls based on them. I've not figured
+// out the deal with plugins yet.
+template <>
+struct ParamTraits<gfx::NativeView> {
+ typedef gfx::NativeView param_type;
+ static void Write(Message* m, const param_type& p) {
+ NOTIMPLEMENTED();
+ }
+
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ NOTIMPLEMENTED();
+ *p = NULL;
+ return true;
+ }
+
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"<gfx::NativeView>"));
+ }
+};
+
+#endif // defined(OS_POSIX)
+
} // namespace IPC
#endif // CHROME_COMMON_RENDER_MESSAGES_H_
« no previous file with comments | « chrome/common/bitmap_wire_data.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698