summaryrefslogtreecommitdiffstats
path: root/android_webview/common
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-01 01:33:03 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-01 01:33:03 +0000
commitfada28b55b676a75333a6fe9efa22bb97df0248d (patch)
tree5304a40d7677afd0f834df1ccd6145e02f99ab80 /android_webview/common
parent4f4e00cbc1071345fd54589c4e2f4fbf9a951257 (diff)
downloadchromium_src-fada28b55b676a75333a6fe9efa22bb97df0248d.zip
chromium_src-fada28b55b676a75333a6fe9efa22bb97df0248d.tar.gz
chromium_src-fada28b55b676a75333a6fe9efa22bb97df0248d.tar.bz2
Implement DocuementHasImages
Requires new plumbing to get custom android_webview layer IPC messages a flowing. BUG= Review URL: https://chromiumcodereview.appspot.com/10890024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/common')
-rw-r--r--android_webview/common/android_webview_message_generator.cc34
-rw-r--r--android_webview/common/android_webview_message_generator.h8
-rw-r--r--android_webview/common/render_view_messages.cc11
-rw-r--r--android_webview/common/render_view_messages.h43
4 files changed, 96 insertions, 0 deletions
diff --git a/android_webview/common/android_webview_message_generator.cc b/android_webview/common/android_webview_message_generator.cc
new file mode 100644
index 0000000..d8b0080
--- /dev/null
+++ b/android_webview/common/android_webview_message_generator.cc
@@ -0,0 +1,34 @@
+// 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.
+
+// Get basic type definitions.
+#define IPC_MESSAGE_IMPL
+#include "android_webview/common/android_webview_message_generator.h"
+
+// Generate constructors.
+#include "ipc/struct_constructor_macros.h"
+#include "android_webview/common/android_webview_message_generator.h"
+
+// Generate destructors.
+#include "ipc/struct_destructor_macros.h"
+#include "android_webview/common/android_webview_message_generator.h"
+
+// Generate param traits write methods.
+#include "ipc/param_traits_write_macros.h"
+namespace IPC {
+#include "android_webview/common/android_webview_message_generator.h"
+} // namespace IPC
+
+// Generate param traits read methods.
+#include "ipc/param_traits_read_macros.h"
+namespace IPC {
+#include "android_webview/common/android_webview_message_generator.h"
+} // namespace IPC
+
+// Generate param traits log methods.
+#include "ipc/param_traits_log_macros.h"
+namespace IPC {
+#include "android_webview/common/android_webview_message_generator.h"
+} // namespace IPC
+
diff --git a/android_webview/common/android_webview_message_generator.h b/android_webview/common/android_webview_message_generator.h
new file mode 100644
index 0000000..40d2d0a
--- /dev/null
+++ b/android_webview/common/android_webview_message_generator.h
@@ -0,0 +1,8 @@
+// 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 "android_webview/common/render_view_messages.h"
+
diff --git a/android_webview/common/render_view_messages.cc b/android_webview/common/render_view_messages.cc
new file mode 100644
index 0000000..a954e2a
--- /dev/null
+++ b/android_webview/common/render_view_messages.cc
@@ -0,0 +1,11 @@
+// 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.
+
+#include "android_webview/common/render_view_messages.h"
+
+namespace IPC {
+
+// TODO - add enums and custom IPC traits here when needed.
+
+} // namespace IPC
diff --git a/android_webview/common/render_view_messages.h b/android_webview/common/render_view_messages.h
new file mode 100644
index 0000000..52bea1b
--- /dev/null
+++ b/android_webview/common/render_view_messages.h
@@ -0,0 +1,43 @@
+// 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, no traditional include guard.
+#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_platform_file.h"
+
+// Singly-included section for enums and custom IPC traits.
+#ifndef ANDROID_WEBVIEW_COMMON_RENDER_VIEW_MESSAGES_H_
+#define ANDROID_WEBVIEW_COMMON_RENDER_VIEW_MESSAGES_H_
+
+
+namespace IPC {
+
+// TODO - add enums and custom IPC traits here when needed.
+
+} // namespace IPC
+
+#endif // ANDROID_WEBVIEW_COMMON_RENDER_VIEW_MESSAGES_H_
+
+#define IPC_MESSAGE_START AndroidWebViewMsgStart
+
+//-----------------------------------------------------------------------------
+// RenderView messages
+// These are messages sent from the browser to the renderer process.
+
+// Request for the renderer to determine if the document contains any image
+// elements. The id should be passed in the response message so the response
+// can be associated with the request.
+IPC_MESSAGE_ROUTED1(AwViewMsg_DocumentHasImages,
+ int /* id */)
+
+//-----------------------------------------------------------------------------
+// RenderView messages
+// These are messages sent from the renderer to the browser process.
+
+// Response to AwViewMsg_DocumentHasImages request.
+IPC_MESSAGE_ROUTED2(AwViewHostMsg_DocumentHasImagesResponse,
+ int, /* id */
+ bool /* has_images */)
+