Skip to content

Commit

Permalink
Split the IPC code into ipc/
Browse files Browse the repository at this point in the history
This splits the ipc code from the common project.  The 'common' project pulls in
all of webkit, the v8 bindings, skia, googleurl, and a number of other projects
which makes it very difficult to deal with especially for external projects
wanting just to use some of Chromium's infrastructure.  This puts the ipc code
into its top-level ipc/ directory with a dependency only on base.  The common
project depends on the new ipc/ipc.gyp:ipc target so that all projects currently
pulling common in to get the IPC code still have it available.  This mostly
follows agl's pre-gyp attempt to do this which was r13062.

Known issues:
- Currently a number of projects depend on chrome/chrome.gyp:common in order to
use the IPC infrastructure.  Rather than fixing all of these dependencies I have
made common depend on ipc/ipc.gyp:ipc and added "ipc" to the include_rules
section of DEPS so that checkdeps.py doesn't complain.  Over time projects that
need IPC should depend on the IPC project themselves and dependencies on common
removed, although I don't think many projects that need IPC will be able to get
away without common currently.
- ipc/ipc_message_macros.h still has #include "chrome/common/..." inside of a
ipc/ should not refer to files in chrome/... now.  I'm not sure how to resolve
this since it's really an IDE bug
- the named pipe name (windows+linux) and the logging event name (all) + env
variable (posix) refer explicitly to 'Chrome' which somewhat hurts the illusion
of ipc/ being an independent library.  I think this should be examined in a
subsequent, much smaller patch.
- I've eliminated the IPC.SendMsgCount counter since it was implemented in a way
to create a dependency from ipc/ to chrome/common/chrome_counters. This is the
same approach that r13062 took.

http://codereview.chromium.org/155905

(Patch from James Robinson)


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21342 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
agl@chromium.org committed Jul 22, 2009
1 parent 00fceac commit 946d1b2
Show file tree
Hide file tree
Showing 128 changed files with 945 additions and 745 deletions.
1 change: 1 addition & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ include_rules = [
# Everybody can use some things.
"+base",
"+build",
"+ipc",

# For now, we allow ICU to be included by specifying "unicode/...", although
# this should probably change.
Expand Down
2 changes: 1 addition & 1 deletion WATCHLISTS
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
'filepath': 'media|Media|^third_party/ffmpeg/',
},
'ipc': {
'filepath': 'chrome/common/ipc.*',
'filepath': 'ipc/ipc.*',
},
'linux-sandboxing': {
'filepath': 'sandbox/linux/.*',
Expand Down
2 changes: 1 addition & 1 deletion base/file_descriptor_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace base {
// able to use template specialisation to special-case their handling.
//
// WARNING: (Chromium only) There are subtleties to consider if serialising
// these objects over IPC. See comments in chrome/common/ipc_message_utils.h
// these objects over IPC. See comments in ipc/ipc_message_utils.h
// above the template specialisation for this structure.
// -----------------------------------------------------------------------------
struct FileDescriptor {
Expand Down
1 change: 1 addition & 0 deletions build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'../app/app.gyp:*',
'../base/base.gyp:*',
'../chrome/chrome.gyp:*',
'../ipc/ipc.gyp:*',
'../media/media.gyp:*',
'../net/net.gyp:*',
'../printing/printing.gyp:*',
Expand Down
2 changes: 1 addition & 1 deletion chrome/app/breakpad_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "breakpad/linux/linux_libc_support.h"
#include "breakpad/linux/linux_syscall_support.h"
#include "breakpad/linux/memory.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/google_update_settings.h"

static const char kUploadURL[] =
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/app_modal_dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"

AppModalDialog::AppModalDialog(TabContents* tab_contents,
const std::wstring& title,
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/automation/automation_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/ipc_channel.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/test/automation/automation_constants.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_channel.h"
#if defined(OS_WIN)
#include "views/event.h"
#endif // defined(OS_WIN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/lock.h"
#include "base/platform_thread.h"
#include "chrome/common/ipc_channel_proxy.h"
#include "ipc/ipc_channel_proxy.h"

class URLRequestAutomationJob;
class MessageLoop;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/automation/automation_resource_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include <map>

#include "base/basictypes.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_type.h"
#include "ipc/ipc_message.h"

template <class T> class Source;

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/automation/extension_port_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"

class AutomationProvider;
class ExtensionMessageService;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/extension_message_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "base/linked_ptr.h"
#include "base/lock.h"
#include "base/ref_counted.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/notification_registrar.h"
#include "ipc/ipc_message.h"

class MessageLoop;
class Profile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_

#include "base/ref_counted.h"
#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"

class WebKitContext;
class WebKitThread;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/jsmessage_box_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <string>

#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"

class GURL;
class TabContents;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/modal_html_dialog_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include "base/gfx/size.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/notification_registrar.h"
#include "ipc/ipc_message.h"

// This class can only be used on the UI thread.
class ModalHtmlDialogDelegate
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/net/resolve_proxy_msg_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <deque>
#include <string>

#include "chrome/common/ipc_message.h"
#include "net/base/completion_callback.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
#include "net/base/completion_callback.h"
#include "net/proxy/proxy_service.h"

// This class holds the common logic used to respond to the messages:
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/plugin_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
#include "chrome/browser/renderer_host/browser_render_process_host.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/ipc_channel_handle.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_descriptors.h"
#include "net/base/cookie_monster.h"
#include "net/base/file_stream.h"
#include "net/base/io_buffer.h"
Expand All @@ -56,7 +56,7 @@
#endif

#if defined(OS_POSIX)
#include "chrome/common/ipc_channel_posix.h"
#include "ipc/ipc_channel_posix.h"
#endif

#if defined(OS_LINUX)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/plugin_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/child_process_host.h"
#include "chrome/common/ipc_channel_handle.h"
#include "ipc/ipc_channel_handle.h"
#include "webkit/glue/webplugininfo.h"

class URLRequestContext;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/renderer_host/audio_renderer_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "base/shared_memory.h"
#include "base/waitable_event.h"
#include "chrome/browser/renderer_host/audio_renderer_host.h"
#include "chrome/common/ipc_logging.h"
#include "chrome/common/render_messages.h"
#include "ipc/ipc_logging.h"

namespace {

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/renderer_host/audio_renderer_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#include "base/ref_counted.h"
#include "base/shared_memory.h"
#include "base/waitable_event.h"
#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"
#include "media/audio/audio_output.h"
#include "media/audio/simple_sources.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#include "chrome/browser/spellchecker.h"
#include "chrome/browser/visitedlink_master.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/child_process_info.h"
#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/process_watcher.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/renderer_host/render_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "base/id_map.h"
#include "base/process.h"
#include "base/scoped_ptr.h"
#include "chrome/common/ipc_sync_channel.h"
#include "chrome/common/transport_dib.h"
#include "chrome/common/visitedlink_common.h"
#include "ipc/ipc_sync_channel.h"

class Profile;

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/renderer_host/render_widget_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/common/ipc_channel.h"
#include "chrome/common/native_web_keyboard_event.h"
#include "chrome/common/property_bag.h"
#include "ipc/ipc_channel.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/api/public/WebTextDirection.h"

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/renderer_host/resource_dispatcher_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "chrome/browser/renderer_host/resource_handler.h"
#include "chrome/common/child_process_info.h"
#include "chrome/common/filter_policy.h"
#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"
#include "net/url_request/url_request.h"
#include "webkit/glue/resource_type.h"

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/renderer_host/resource_message_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "chrome/browser/renderer_host/render_widget_helper.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/ipc_channel_proxy.h"
#include "chrome/common/modal_dialog_event.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/transport_dib.h"
#include "ipc/ipc_channel_proxy.h"
#include "webkit/api/public/WebCache.h"

#if defined(OS_WIN)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/sandbox_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/debug_flags.h"
#include "chrome/common/ipc_logging.h"
#include "chrome/common/notification_service.h"
#include "ipc/ipc_logging.h"
#include "sandbox/src/sandbox.h"
#include "webkit/glue/plugins/plugin_list.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/render_view_host_manager.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/test_notification_tracker.h"
#include "ipc/ipc_message.h"
#include "testing/gtest/include/gtest/gtest.h"

class RenderViewHostManagerTest : public RenderViewHostTestHarness {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/tab_contents/web_contents_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/test_web_contents.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/ipc_channel.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/render_messages.h"
#include "chrome/test/testing_profile.h"
#include "ipc/ipc_channel.h"
#include "testing/gtest/include/gtest/gtest.h"

using webkit_glue::PasswordForm;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/utility_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "chrome/browser/sandbox_policy.h"
#elif defined(OS_POSIX)
#include "base/global_descriptors_posix.h"
#include "chrome/common/chrome_descriptors.h"
#include "ipc/ipc_descriptors.h"
#endif

UtilityProcessHost::UtilityProcessHost(ResourceDispatcherHost* rdh,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/utility_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/ref_counted.h"
#include "base/task.h"
#include "chrome/common/child_process_host.h"
#include "chrome/common/ipc_channel.h"
#include "ipc/ipc_channel.h"

class CommandLine;
class DictionaryValue;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/views/about_ipc_dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// IPC_MESSAGE_LOG_ENABLED. We need to use it to define
// IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
// ViewMsgLog et al. functions.
#include "chrome/common/ipc_message.h"
#include "ipc/ipc_message.h"

#ifdef IPC_MESSAGE_LOG_ENABLED
#define IPC_MESSAGE_MACROS_LOG_ENABLED
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/views/about_ipc_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define CHROME_BROWSER_VIEWS_ABOUT_IPC_DIALOG_H_

#include "base/singleton.h"
#include "chrome/common/ipc_logging.h"
#include "ipc/ipc_logging.h"
#include "views/controls/button/button.h"
#include "views/controls/table/table_view.h"
#include "views/window/dialog_delegate.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/worker_host/worker_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/worker_host/worker_service.h"
#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/debug_flags.h"
#include "chrome/common/process_watcher.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/worker_messages.h"
#include "ipc/ipc_descriptors.h"
#include "net/base/registry_controlled_domain.h"

#if defined(OS_WIN)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/worker_host/worker_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include "base/basictypes.h"
#include "chrome/common/child_process_host.h"
#include "chrome/common/ipc_channel.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"

class WorkerProcessHost : public ChildProcessHost {
public:
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/worker_host/worker_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include "base/basictypes.h"
#include "base/singleton.h"
#include "chrome/browser/worker_host/worker_process_host.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"


class MessageLoop;
Expand Down
Loading

0 comments on commit 946d1b2

Please sign in to comment.