summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/child_process_host.h5
-rw-r--r--chrome/common/child_process_info.h3
-rw-r--r--chrome/common/chrome_switches.cc17
-rw-r--r--chrome/common/chrome_switches.h5
-rw-r--r--chrome/common/gpu_messages.h28
-rw-r--r--chrome/common/gpu_messages_internal.h59
6 files changed, 105 insertions, 12 deletions
diff --git a/chrome/common/child_process_host.h b/chrome/common/child_process_host.h
index 94bdafd..1ca547b 100644
--- a/chrome/common/child_process_host.h
+++ b/chrome/common/child_process_host.h
@@ -69,6 +69,8 @@ class ChildProcessHost : public ResourceDispatcherHost::Receiver,
};
protected:
+ // The resource_dispatcher_host may be NULL to indicate none is needed for
+ // this process type.
ChildProcessHost(ProcessType type,
ResourceDispatcherHost* resource_dispatcher_host);
@@ -127,7 +129,10 @@ class ChildProcessHost : public ResourceDispatcherHost::Receiver,
};
ListenerHook listener_;
+
+ // May be NULL if this current process has no resource dispatcher host.
ResourceDispatcherHost* resource_dispatcher_host_;
+
bool opening_channel_; // True while we're waiting the channel to be opened.
scoped_ptr<IPC::Channel> channel_;
std::string channel_id_;
diff --git a/chrome/common/child_process_info.h b/chrome/common/child_process_info.h
index 50d1d0d..5726675 100644
--- a/chrome/common/child_process_info.h
+++ b/chrome/common/child_process_info.h
@@ -24,7 +24,8 @@ class ChildProcessInfo {
UTILITY_PROCESS,
PROFILE_IMPORT_PROCESS,
ZYGOTE_PROCESS,
- SANDBOX_HELPER_PROCESS
+ SANDBOX_HELPER_PROCESS,
+ GPU_PROCESS
};
ChildProcessInfo(const ChildProcessInfo& original);
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index af88125..251b382 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -205,7 +205,7 @@ const char kEnableFastback[] = "enable-fastback";
const char kEnableFileCookies[] = "enable-file-cookies";
// Enable Geolocation support.
-const char kEnableGeolocation[] = "enable-geolocation";
+const char kEnableGeolocation[] = "enable-geolocation";
// Enable the GPU plugin and Pepper 3D rendering.
const char kEnableGPUPlugin[] = "enable-gpu-plugin";
@@ -298,6 +298,9 @@ const char kFirstRun[] = "first-run";
// current details.
const char kForceFieldTestNameAndValue[] = "force-fieldtest";
+// Makes this process a GPU sub-process.
+const char kGpuProcess[] = "gpu-process";
+
// Make Windows happy by allowing it to show "Enable access to this program"
// checkbox in Add/Remove Programs->Set Program Access and Defaults. This
// only shows an error box because the only way to hide Chrome is by
@@ -325,12 +328,6 @@ const char kInternalNaCl[] = "internal-nacl";
// Runs a trusted Pepper plugin inside the renderer process.
const char kInternalPepper[] = "internal-pepper";
-#ifndef NDEBUG
-// Makes sure any sync login attempt will fail with an error. (Only
-// used for testing.)
-const char kInvalidateSyncLogin[] = "invalidate-sync-login";
-#endif
-
// Specifies the flags passed to JS engine
const char kJavaScriptFlags[] = "js-flags";
@@ -733,6 +730,10 @@ const char kKioskMode[] = "kiosk";
#ifndef NDEBUG
// Debug only switch to specify which gears plugin dll to load.
const char kGearsPluginPathOverride[] = "gears-plugin-path";
+
+// Makes sure any sync login attempt will fail with an error. (Only
+// used for testing.)
+const char kInvalidateSyncLogin[] = "invalidate-sync-login";
#endif
// -----------------------------------------------------------------------------
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 7e3deaf..15b1975 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -96,6 +96,7 @@ extern const char kExtensionsUpdateFrequency[];
extern const char kFileDescriptorLimit[];
extern const char kFirstRun[];
extern const char kForceFieldTestNameAndValue[];
+extern const char kGpuProcess[];
extern const char kHideIcons[];
extern const char kHomePage[];
extern const char kImport[];
@@ -103,9 +104,6 @@ extern const char kInProcessPlugins[];
extern const char kIncognito[];
extern const char kInternalNaCl[];
extern const char kInternalPepper[];
-#ifndef NDEBUG
-extern const char kInvalidateSyncLogin[];
-#endif
extern const char kJavaScriptFlags[];
extern const char kLoadExtension[];
extern const char kLoadPlugin[];
@@ -221,6 +219,7 @@ extern const char kKioskMode[];
#ifndef NDEBUG
extern const char kGearsPluginPathOverride[];
+extern const char kInvalidateSyncLogin[];
#endif
// DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
diff --git a/chrome/common/gpu_messages.h b/chrome/common/gpu_messages.h
new file mode 100644
index 0000000..52e3d6f
--- /dev/null
+++ b/chrome/common/gpu_messages.h
@@ -0,0 +1,28 @@
+// 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_MESSAGES_H_
+#define CHROME_COMMON_GPU_MESSAGES_H_
+
+#include <vector>
+
+#include "app/gfx/native_widget_types.h"
+#include "base/basictypes.h"
+#include "base/gfx/rect.h"
+#include "base/gfx/size.h"
+#include "chrome/common/common_param_traits.h"
+#include "chrome/common/transport_dib.h"
+
+namespace IPC {
+
+// Potential new structures for messages go here.
+
+} // namespace IPC
+
+#define MESSAGES_INTERNAL_FILE \
+ "chrome/common/gpu_messages_internal.h"
+#include "ipc/ipc_message_macros.h"
+
+#endif // CHROME_COMMON_GPU_MESSAGES_H_
+
diff --git a/chrome/common/gpu_messages_internal.h b/chrome/common/gpu_messages_internal.h
new file mode 100644
index 0000000..73a82f1
--- /dev/null
+++ b/chrome/common/gpu_messages_internal.h
@@ -0,0 +1,59 @@
+// 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.
+
+// This header is meant to be included in multiple passes, hence no traditional
+// header guard. It is included by backing_store_messages_internal.h
+// See ipc_message_macros.h for explanation of the macros and passes.
+
+// This file needs to be included again, even though we're actually included
+// from it via utility_messages.h.
+#include "ipc/ipc_message_macros.h"
+
+//------------------------------------------------------------------------------
+// Backing Store Messages
+// These are messages from the browser to the GPU process.
+IPC_BEGIN_MESSAGES(Gpu)
+
+ IPC_MESSAGE_CONTROL2(GpuMsg_NewRenderWidgetHostView,
+ gfx::NativeViewId, /* parent window */
+ int32 /* view_id */)
+
+ // Creates a new backing store.
+ IPC_MESSAGE_ROUTED2(GpuMsg_NewBackingStore,
+ int32, /* backing_store_id */
+ gfx::Size /* size */)
+
+ // Updates the backing store with the given bitmap. The GPU process will send
+ // back a GpuHostMsg_PaintToBackingStore_ACK after the paint is complete to
+ // let the caller know the TransportDIB can be freed or reused.
+ IPC_MESSAGE_ROUTED4(GpuMsg_PaintToBackingStore,
+ base::ProcessId, /* process */
+ TransportDIB::Id, /* bitmap */
+ gfx::Rect, /* bitmap_rect */
+ std::vector<gfx::Rect>) /* copy_rects */
+
+
+ IPC_MESSAGE_ROUTED4(GpuMsg_ScrollBackingStore,
+ int, /* dx */
+ int, /* dy */
+ gfx::Rect, /* clip_rect */
+ gfx::Size) /* view_size */
+
+IPC_END_MESSAGES(Gpu)
+
+//------------------------------------------------------------------------------
+// Backing Store Host Messagse
+// These are messages from the GPU process to the browser.
+IPC_BEGIN_MESSAGES(GpuHost)
+
+ // This message is sent in response to BackingStoreMsg_New to tell the host
+ // about the child window that was just created.
+ IPC_MESSAGE_ROUTED1(GpuHostMsg_CreatedRenderWidgetHostView,
+ gfx::NativeViewId)
+
+ // Send in response to GpuMsg_PaintToBackingStore, see that for more.
+ IPC_MESSAGE_ROUTED0(GpuHostMsg_PaintToBackingStore_ACK)
+
+IPC_END_MESSAGES(GpuHost)
+