diff options
33 files changed, 121 insertions, 53 deletions
diff --git a/chrome/common/about_handler.cc b/chrome/common/about_handler.cc index 84658a0..d2121b8 100644 --- a/chrome/common/about_handler.cc +++ b/chrome/common/about_handler.cc @@ -3,6 +3,8 @@ // found in the LICENSE file. #include "chrome/common/about_handler.h" +#include "chrome/common/url_constants.h" +#include "googleurl/src/gurl.h" namespace chrome_about_handler { diff --git a/chrome/common/about_handler.h b/chrome/common/about_handler.h index d3c74f4..49b16ad 100644 --- a/chrome/common/about_handler.h +++ b/chrome/common/about_handler.h @@ -6,8 +6,9 @@ #define CHROME_COMMON_ABOUT_HANDLER_H__ #pragma once -#include "chrome/common/url_constants.h" -#include "googleurl/src/gurl.h" +#include <stddef.h> + +class GURL; namespace chrome_about_handler { diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc index 115308e..dd6fd40 100644 --- a/chrome/common/child_process.cc +++ b/chrome/common/child_process.cc @@ -48,6 +48,14 @@ ChildProcess::~ChildProcess() { child_process_ = NULL; } +ChildThread* ChildProcess::main_thread() { + return main_thread_.get(); +} + +void ChildProcess::set_main_thread(ChildThread* thread) { + main_thread_.reset(thread); +} + void ChildProcess::AddRefProcess() { DCHECK(!main_thread_.get() || // null in unittests. MessageLoop::current() == main_thread_->message_loop()); diff --git a/chrome/common/child_process.h b/chrome/common/child_process.h index 7b8e500..bc878de 100644 --- a/chrome/common/child_process.h +++ b/chrome/common/child_process.h @@ -10,7 +10,8 @@ #include "base/scoped_ptr.h" #include "base/thread.h" #include "base/waitable_event.h" -#include "chrome/common/child_thread.h" + +class ChildThread; // Base class for child processes of the browser process (i.e. renderer and // plugin host). This is a singleton object for each child process. @@ -21,8 +22,8 @@ class ChildProcess { virtual ~ChildProcess(); // Getter for the child process' main thread. - ChildThread* main_thread() { return main_thread_.get(); } - void set_main_thread(ChildThread* thread) { main_thread_.reset(thread); } + ChildThread* main_thread(); + void set_main_thread(ChildThread* thread); MessageLoop* io_message_loop() { return io_thread_.message_loop(); } diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index bcd0c3d..9626976 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -12,6 +12,8 @@ #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/plugin_messages.h" +#include "ipc/ipc_logging.h" +#include "ipc/ipc_message.h" #if defined(OS_LINUX) #include "base/linux_util.h" diff --git a/chrome/common/child_process_host.h b/chrome/common/child_process_host.h index 8628acc..7423a42 100644 --- a/chrome/common/child_process_host.h +++ b/chrome/common/child_process_host.h @@ -6,13 +6,10 @@ #define CHROME_COMMON_CHILD_PROCESS_HOST_H_ #pragma once -#include <list> #include <string> -// Must be included early (e.g. before chrome/common/plugin_messages.h) -#include "ipc/ipc_logging.h" +#include "build/build_config.h" -// Putting this before ipc_logging.h does not work (OS_WIN isn't defined) #if defined(OS_WIN) #include <windows.h> #endif // defined(OS_WIN) @@ -23,9 +20,12 @@ #include "chrome/common/notification_type.h" #include "ipc/ipc_channel.h" - class CommandLine; +namespace IPC { +class Message; +} + // Provides common functionality for hosting a child process and processing IPC // messages between the host and the child process. Subclasses are responsible // for the actual launching and terminating of the child processes. @@ -118,6 +118,8 @@ class ChildProcessHost : public IPC::Channel::Listener { bool opening_channel_; // True while we're waiting the channel to be opened. scoped_ptr<IPC::Channel> channel_; std::string channel_id_; + + DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); }; #endif // CHROME_COMMON_CHILD_PROCESS_HOST_H_ diff --git a/chrome/common/child_process_logging.h b/chrome/common/child_process_logging.h index ec5d2c5..6de7bfe 100644 --- a/chrome/common/child_process_logging.h +++ b/chrome/common/child_process_logging.h @@ -10,9 +10,10 @@ #include <string> #include "base/basictypes.h" -#include "chrome/common/gpu_info.h" #include "googleurl/src/gurl.h" +class GPUInfo; + #if defined(OS_WIN) // The maximum number of active extensions we will report. // Also used in chrome/app, but we define it here to avoid a common->app diff --git a/chrome/common/child_process_logging_win.cc b/chrome/common/child_process_logging_win.cc index f5ffd84..046244f 100644 --- a/chrome/common/child_process_logging_win.cc +++ b/chrome/common/child_process_logging_win.cc @@ -10,6 +10,7 @@ #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/gpu_info.h" #include "chrome/installer/util/google_update_settings.h" #include "googleurl/src/gurl.h" diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc index 91d276e..126fc2b 100644 --- a/chrome/common/child_thread.cc +++ b/chrome/common/child_thread.cc @@ -4,20 +4,22 @@ #include "chrome/common/child_thread.h" +#include "base/message_loop.h" #include "base/string_util.h" #include "base/command_line.h" #include "chrome/common/child_process.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/plugin_messages.h" +#include "chrome/common/resource_dispatcher.h" #include "chrome/common/socket_stream_dispatcher.h" #include "ipc/ipc_logging.h" #include "ipc/ipc_message.h" +#include "ipc/ipc_sync_channel.h" #include "ipc/ipc_sync_message_filter.h" #include "ipc/ipc_switches.h" #include "webkit/glue/webkit_glue.h" - ChildThread::ChildThread() { channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kProcessChannelID); @@ -118,6 +120,17 @@ webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge( CreateBridge(request_info, host_renderer_id, host_render_view_id); } +ResourceDispatcher* ChildThread::resource_dispatcher() { + return resource_dispatcher_.get(); +} + +IPC::SyncMessageFilter* ChildThread::sync_message_filter() { + return sync_message_filter_; +} + +MessageLoop* ChildThread::message_loop() { + return message_loop_; +} void ChildThread::OnMessageReceived(const IPC::Message& msg) { // Resource responses are sent to the resource dispatcher. diff --git a/chrome/common/child_thread.h b/chrome/common/child_thread.h index b170d7d..7f9c3f8 100644 --- a/chrome/common/child_thread.h +++ b/chrome/common/child_thread.h @@ -9,14 +9,16 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "chrome/common/message_router.h" -#include "chrome/common/resource_dispatcher.h" -#include "ipc/ipc_sync_channel.h" #include "ipc/ipc_message.h" +#include "webkit/glue/resource_loader_bridge.h" +class MessageLoop; class NotificationService; +class ResourceDispatcher; class SocketStreamDispatcher; namespace IPC { +class SyncChannel; class SyncMessageFilter; } @@ -46,9 +48,7 @@ class ChildThread : public IPC::Channel::Listener, int host_renderer_id, int host_render_view_id); - ResourceDispatcher* resource_dispatcher() { - return resource_dispatcher_.get(); - } + ResourceDispatcher* resource_dispatcher(); SocketStreamDispatcher* socket_stream_dispatcher() { return socket_stream_dispatcher_.get(); @@ -56,9 +56,9 @@ class ChildThread : public IPC::Channel::Listener, // Safe to call on any thread, as long as it's guaranteed that the thread's // lifetime is less than the main thread. - IPC::SyncMessageFilter* sync_message_filter() { return sync_message_filter_; } + IPC::SyncMessageFilter* sync_message_filter(); - MessageLoop* message_loop() { return message_loop_; } + MessageLoop* message_loop(); // Returns the one child thread. static ChildThread* current(); diff --git a/chrome/common/chrome_plugin_util.h b/chrome/common/chrome_plugin_util.h index 88873bb..f9e7673 100644 --- a/chrome/common/chrome_plugin_util.h +++ b/chrome/common/chrome_plugin_util.h @@ -39,7 +39,8 @@ struct ScopableCPRequest : public CPRequest { // This is a base class for plugin-related objects that need to go away when // the plugin unloads. This object also verifies that it is created and // destroyed on the same thread. -class PluginHelper : public NotificationObserver, public NonThreadSafe { +class PluginHelper : public NotificationObserver, + public NonThreadSafe { public: static void DestroyAllHelpersForPlugin(ChromePluginLib* plugin); diff --git a/chrome/common/important_file_writer.h b/chrome/common/important_file_writer.h index a25ad5f..5fdabce 100644 --- a/chrome/common/important_file_writer.h +++ b/chrome/common/important_file_writer.h @@ -62,7 +62,7 @@ class ImportantFileWriter : public NonThreadSafe { // of destruction. ~ImportantFileWriter(); - FilePath path() const { return path_; } + const FilePath& path() const { return path_; } // Returns true if there is a scheduled write pending which has not yet // been started. diff --git a/chrome/common/ipc_test_sink.cc b/chrome/common/ipc_test_sink.cc index 04fd065..45db8f5 100644 --- a/chrome/common/ipc_test_sink.cc +++ b/chrome/common/ipc_test_sink.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "chrome/common/ipc_test_sink.h" +#include "ipc/ipc_message.h" namespace IPC { diff --git a/chrome/common/ipc_test_sink.h b/chrome/common/ipc_test_sink.h index 8fc621a..caf6276 100644 --- a/chrome/common/ipc_test_sink.h +++ b/chrome/common/ipc_test_sink.h @@ -11,10 +11,11 @@ #include "base/basictypes.h" #include "ipc/ipc_channel.h" -#include "ipc/ipc_message.h" namespace IPC { +class Message; + // This test sink provides a "sink" for IPC messages that are sent. It allows // the caller to query messages received in various different ways. It is // designed for tests for objects that use the IPC system. diff --git a/chrome/common/main_function_params.h b/chrome/common/main_function_params.h index 6d5291f..0f0ed37 100644 --- a/chrome/common/main_function_params.h +++ b/chrome/common/main_function_params.h @@ -16,6 +16,7 @@ namespace base { class ScopedNSAutoreleasePool; }; + class Task; struct MainFunctionParams { diff --git a/chrome/common/metrics_helpers.h b/chrome/common/metrics_helpers.h index a137ecf..990a9fe 100644 --- a/chrome/common/metrics_helpers.h +++ b/chrome/common/metrics_helpers.h @@ -219,6 +219,8 @@ class MetricsServiceBase { // For histograms, record what we've already logged (as a sample for each // histogram) so that we can send only the delta with the next log. LoggedSampleMap logged_samples_; + + DISALLOW_COPY_AND_ASSIGN(MetricsServiceBase); }; #endif // CHROME_COMMON_METRICS_HELPERS_H_ diff --git a/chrome/common/nacl_cmd_line.cc b/chrome/common/nacl_cmd_line.cc index 82c2634..c2a3b8c 100644 --- a/chrome/common/nacl_cmd_line.cc +++ b/chrome/common/nacl_cmd_line.cc @@ -8,27 +8,29 @@ #include "chrome/common/logging_chrome.h" namespace nacl { - void CopyNaClCommandLineArguments(CommandLine* cmd_line) { - const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); - if (logging::DialogsAreSuppressed()) - cmd_line->AppendSwitch(switches::kNoErrorDialogs); - // Propagate the following switches to the NaCl loader command line (along - // with any associated values) if present in the browser command line. - // TODO(gregoryd): check which flags of those below can be supported. - static const char* const kSwitchNames[] = { - switches::kNoSandbox, - switches::kTestNaClSandbox, - switches::kDisableBreakpad, - switches::kFullMemoryCrashReport, - switches::kEnableLogging, - switches::kDisableLogging, - switches::kLoggingLevel, - switches::kEnableDCHECK, - switches::kSilentDumpOnDCHECK, - switches::kMemoryProfiling, - }; - cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, - arraysize(kSwitchNames)); - } +void CopyNaClCommandLineArguments(CommandLine* cmd_line) { + const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); + if (logging::DialogsAreSuppressed()) + cmd_line->AppendSwitch(switches::kNoErrorDialogs); + + // Propagate the following switches to the NaCl loader command line (along + // with any associated values) if present in the browser command line. + // TODO(gregoryd): check which flags of those below can be supported. + static const char* const kSwitchNames[] = { + switches::kNoSandbox, + switches::kTestNaClSandbox, + switches::kDisableBreakpad, + switches::kFullMemoryCrashReport, + switches::kEnableLogging, + switches::kDisableLogging, + switches::kLoggingLevel, + switches::kEnableDCHECK, + switches::kSilentDumpOnDCHECK, + switches::kMemoryProfiling, + }; + cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, + arraysize(kSwitchNames)); +} + } diff --git a/chrome/common/nacl_cmd_line.h b/chrome/common/nacl_cmd_line.h index cb704b1..e2edccc 100644 --- a/chrome/common/nacl_cmd_line.h +++ b/chrome/common/nacl_cmd_line.h @@ -6,7 +6,7 @@ #define CHROME_COMMON_NACL_CMD_LINE_H_ #pragma once -#include "base/command_line.h" +class CommandLine; namespace nacl { // Copy all the relevant arguments from the command line of the current diff --git a/chrome/common/socket_stream_dispatcher.cc b/chrome/common/socket_stream_dispatcher.cc index 97aed21..83ef0e1 100644 --- a/chrome/common/socket_stream_dispatcher.cc +++ b/chrome/common/socket_stream_dispatcher.cc @@ -7,7 +7,9 @@ #include <vector> #include "base/id_map.h" +#include "base/message_loop.h" #include "base/ref_counted.h" +#include "base/task.h" #include "chrome/common/child_thread.h" #include "chrome/common/render_messages.h" #include "chrome/common/net/socket_stream.h" diff --git a/chrome/nacl/broker_thread.h b/chrome/nacl/broker_thread.h index ab5376a6..6590635 100644 --- a/chrome/nacl/broker_thread.h +++ b/chrome/nacl/broker_thread.h @@ -6,6 +6,7 @@ #define CHROME_NACL_BROKER_THREAD_H_ #pragma once +#include "base/process.h" #include "chrome/common/child_thread.h" #include "chrome/common/nacl_types.h" diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc index d37a0f5..74fd341 100644 --- a/chrome/plugin/chrome_plugin_host.cc +++ b/chrome/plugin/chrome_plugin_host.cc @@ -15,6 +15,7 @@ #include "chrome/common/chrome_plugin_util.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/plugin_messages.h" +#include "chrome/common/resource_dispatcher.h" #include "chrome/plugin/plugin_thread.h" #include "chrome/plugin/webplugin_proxy.h" #include "net/base/data_url.h" diff --git a/chrome/renderer/about_handler.cc b/chrome/renderer/about_handler.cc index 56618df..5e6659e 100644 --- a/chrome/renderer/about_handler.cc +++ b/chrome/renderer/about_handler.cc @@ -6,6 +6,7 @@ #include "base/platform_thread.h" #include "chrome/common/about_handler.h" +#include "googleurl/src/gurl.h" typedef void (*AboutHandlerFuncPtr)(); diff --git a/chrome/renderer/audio_message_filter.cc b/chrome/renderer/audio_message_filter.cc index d9c3a44..59b82c4 100644 --- a/chrome/renderer/audio_message_filter.cc +++ b/chrome/renderer/audio_message_filter.cc @@ -5,6 +5,7 @@ #include "chrome/renderer/audio_message_filter.h" #include "base/message_loop.h" +#include "base/time.h" #include "chrome/common/render_messages.h" #include "ipc/ipc_logging.h" diff --git a/chrome/renderer/audio_message_filter.h b/chrome/renderer/audio_message_filter.h index cb397bc..25e5bb7 100644 --- a/chrome/renderer/audio_message_filter.h +++ b/chrome/renderer/audio_message_filter.h @@ -15,11 +15,14 @@ #include "base/id_map.h" #include "base/shared_memory.h" #include "base/sync_socket.h" -#include "base/time.h" #include "ipc/ipc_channel_proxy.h" struct ViewMsg_AudioStreamState_Params; +namespace base { +class Time; +} + class AudioMessageFilter : public IPC::ChannelProxy::MessageFilter { public: class Delegate { diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc index 00138a6..aade75f 100644 --- a/chrome/renderer/command_buffer_proxy.cc +++ b/chrome/renderer/command_buffer_proxy.cc @@ -4,10 +4,13 @@ #include "base/logging.h" #include "base/process_util.h" +#include "base/shared_memory.h" +#include "base/task.h" #include "chrome/common/gpu_messages.h" #include "chrome/common/plugin_messages.h" #include "chrome/renderer/command_buffer_proxy.h" #include "chrome/renderer/plugin_channel_host.h" +#include "gfx/size.h" #include "gpu/command_buffer/common/cmd_buffer_common.h" using gpu::Buffer; @@ -211,6 +214,10 @@ void CommandBufferProxy::ResizeOffscreenFrameBuffer(const gfx::Size& size) { Send(message); } +void CommandBufferProxy::SetNotifyRepaintTask(Task* task) { + notify_repaint_task_.reset(task); +} + #if defined(OS_MACOSX) void CommandBufferProxy::SetWindowSize(const gfx::Size& size) { Send(new GpuCommandBufferMsg_SetWindowSize(route_id_, size)); diff --git a/chrome/renderer/command_buffer_proxy.h b/chrome/renderer/command_buffer_proxy.h index 39421c7..9b8e3f7 100644 --- a/chrome/renderer/command_buffer_proxy.h +++ b/chrome/renderer/command_buffer_proxy.h @@ -13,16 +13,21 @@ #include "base/callback.h" #include "base/linked_ptr.h" -#include "base/ref_counted.h" #include "base/scoped_ptr.h" -#include "base/shared_memory.h" -#include "base/task.h" -#include "gfx/size.h" #include "gpu/command_buffer/common/command_buffer.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_message.h" +namespace base { +class SharedMemory; +} + +namespace gfx { +class Size; +} + class PluginChannelHost; +class Task; // Client side proxy that forwards messages synchronously to a // CommandBufferStub. @@ -64,9 +69,7 @@ class CommandBufferProxy : public gpu::CommandBuffer, // Set a task that will be invoked the next time the window becomes invalid // and needs to be repainted. Takes ownership of task. - void SetNotifyRepaintTask(Task* task) { - notify_repaint_task_.reset(task); - } + void SetNotifyRepaintTask(Task* task); #if defined(OS_MACOSX) virtual void SetWindowSize(const gfx::Size& size); diff --git a/chrome/renderer/mock_render_thread.cc b/chrome/renderer/mock_render_thread.cc index 57e9d80..6644634 100644 --- a/chrome/renderer/mock_render_thread.cc +++ b/chrome/renderer/mock_render_thread.cc @@ -10,6 +10,7 @@ #include "base/process_util.h" #include "chrome/common/render_messages.h" #include "ipc/ipc_message_utils.h" +#include "ipc/ipc_sync_message.h" #include "testing/gtest/include/gtest/gtest.h" MockRenderThread::MockRenderThread() diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h index 19ff4e4..d4ee0aa 100644 --- a/chrome/renderer/mock_render_thread.h +++ b/chrome/renderer/mock_render_thread.h @@ -13,6 +13,10 @@ #include "chrome/renderer/render_thread.h" #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" +namespace IPC { +class MessageReplyDeserializer; +} + struct ViewMsg_Print_Params; struct ViewMsg_PrintPages_Params; struct ViewHostMsg_ScriptedPrint_Params; diff --git a/chrome/renderer/render_process_unittest.cc b/chrome/renderer/render_process_unittest.cc index e99e44a..a1005b9 100644 --- a/chrome/renderer/render_process_unittest.cc +++ b/chrome/renderer/render_process_unittest.cc @@ -6,6 +6,7 @@ #include "base/string_util.h" #include "chrome/renderer/render_process_impl.h" #include "gfx/rect.h" +#include "ipc/ipc_channel.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h index 55d53d6..4990b553 100644 --- a/chrome/renderer/render_thread.h +++ b/chrome/renderer/render_thread.h @@ -18,6 +18,7 @@ #include "chrome/common/css_colors.h" #include "chrome/renderer/visitedlink_slave.h" #include "gfx/native_widget_types.h" +#include "ipc/ipc_channel_proxy.h" #include "ipc/ipc_platform_file.h" class AppCacheDispatcher; diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h index f85d2a9d0..2164f66 100644 --- a/chrome/renderer/webplugin_delegate_pepper.h +++ b/chrome/renderer/webplugin_delegate_pepper.h @@ -14,6 +14,7 @@ #include "base/id_map.h" #include "base/ref_counted.h" #include "base/weak_ptr.h" +#include "base/task.h" #include "chrome/renderer/pepper_devices.h" #include "chrome/renderer/command_buffer_proxy.h" #include "gfx/native_widget_types.h" diff --git a/chrome/worker/webworkerclient_proxy.cc b/chrome/worker/webworkerclient_proxy.cc index 18ed954..d591de5 100644 --- a/chrome/worker/webworkerclient_proxy.cc +++ b/chrome/worker/webworkerclient_proxy.cc @@ -5,6 +5,7 @@ #include "chrome/worker/webworkerclient_proxy.h" #include "base/command_line.h" +#include "base/message_loop.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/webmessageportchannel_impl.h" #include "chrome/common/worker_messages.h" diff --git a/chrome/worker/worker_thread.cc b/chrome/worker/worker_thread.cc index 4048f8a..b2e9f18 100644 --- a/chrome/worker/worker_thread.cc +++ b/chrome/worker/worker_thread.cc @@ -15,6 +15,7 @@ #include "chrome/worker/webworker_stub.h" #include "chrome/worker/websharedworker_stub.h" #include "chrome/worker/worker_webkitclient_impl.h" +#include "ipc/ipc_sync_channel.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" |