summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
commitc38831a108f9f905ce9e68503ee67274939cc950 (patch)
tree7c93c8afd386fdc11a0f03855cee62c2d3449d63 /content/browser/renderer_host
parent75c753a51b150912055d7a8305cf77134d24816a (diff)
downloadchromium_src-c38831a108f9f905ce9e68503ee67274939cc950.zip
chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.gz
chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.bz2
Split BrowserThread into public API and private implementation, step 1.
Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host')
-rw-r--r--content/browser/renderer_host/accelerated_plugin_view_mac.mm2
-rw-r--r--content/browser/renderer_host/buffered_resource_handler.cc2
-rw-r--r--content/browser/renderer_host/clipboard_message_filter_mac.mm4
-rw-r--r--content/browser/renderer_host/java_bridge_dispatcher_host.cc4
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager.cc2
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager_unittest.cc7
-rw-r--r--content/browser/renderer_host/media/audio_input_renderer_host.h2
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host.h2
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host_unittest.cc12
-rw-r--r--content/browser/renderer_host/media/media_stream_device_settings.cc2
-rw-r--r--content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc11
-rw-r--r--content/browser/renderer_host/media/media_stream_manager.cc2
-rw-r--r--content/browser/renderer_host/media/video_capture_controller.cc2
-rw-r--r--content/browser/renderer_host/media/video_capture_host_unittest.cc12
-rw-r--r--content/browser/renderer_host/media/video_capture_manager.cc2
-rw-r--r--content/browser/renderer_host/media/video_capture_manager_unittest.cc7
-rw-r--r--content/browser/renderer_host/pepper_file_message_filter.cc2
-rw-r--r--content/browser/renderer_host/pepper_message_filter.cc4
-rw-r--r--content/browser/renderer_host/render_message_filter.cc2
-rw-r--r--content/browser/renderer_host/render_process_host.cc2
-rw-r--r--content/browser/renderer_host/render_view_host_notification_task.h4
-rw-r--r--content/browser/renderer_host/render_widget_helper.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_unittest.cc7
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm8
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac_unittest.mm12
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.cc2
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_unittest.cc6
-rw-r--r--content/browser/renderer_host/resource_handler.h2
-rw-r--r--content/browser/renderer_host/resource_message_filter.cc4
-rw-r--r--content/browser/renderer_host/resource_queue.cc2
-rw-r--r--content/browser/renderer_host/resource_queue_unittest.cc6
-rw-r--r--content/browser/renderer_host/text_input_client_message_filter.mm2
32 files changed, 77 insertions, 65 deletions
diff --git a/content/browser/renderer_host/accelerated_plugin_view_mac.mm b/content/browser/renderer_host/accelerated_plugin_view_mac.mm
index 80a8a68..69757c5 100644
--- a/content/browser/renderer_host/accelerated_plugin_view_mac.mm
+++ b/content/browser/renderer_host/accelerated_plugin_view_mac.mm
@@ -8,8 +8,8 @@
#include "base/command_line.h"
#include "base/debug/trace_event.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
+#include "content/public/browser/browser_thread.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_switches.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index 590f9b32..b4363d92 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/string_util.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/download/download_resource_handler.h"
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
@@ -18,6 +17,7 @@
#include "content/browser/renderer_host/x509_user_cert_resource_handler.h"
#include "content/browser/resource_context.h"
#include "content/common/resource_response.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "net/base/io_buffer.h"
diff --git a/content/browser/renderer_host/clipboard_message_filter_mac.mm b/content/browser/renderer_host/clipboard_message_filter_mac.mm
index 829a227..b8e7be1 100644
--- a/content/browser/renderer_host/clipboard_message_filter_mac.mm
+++ b/content/browser/renderer_host/clipboard_message_filter_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -7,8 +7,8 @@
#import <Cocoa/Cocoa.h>
#include "base/sys_string_conversions.h"
-#include "content/browser/browser_thread.h"
#import "content/browser/find_pasteboard.h"
+#include "content/public/browser/browser_thread.h"
// The number of utf16 code units that will be written to the find pasteboard,
// longer texts are silently ignored. This is to prevent that a compromised
diff --git a/content/browser/renderer_host/java_bridge_dispatcher_host.cc b/content/browser/renderer_host/java_bridge_dispatcher_host.cc
index 2cc6486..60e33fb 100644
--- a/content/browser/renderer_host/java_bridge_dispatcher_host.cc
+++ b/content/browser/renderer_host/java_bridge_dispatcher_host.cc
@@ -4,14 +4,14 @@
#include "content/browser/renderer_host/java_bridge_dispatcher_host.h"
-#include "content/browser/browser_thread.h"
-#include "content/browser/renderer_host/java_bridge_channel_host.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
+#include "content/browser/renderer_host/java_bridge_channel_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/common/child_process.h"
#include "content/common/java_bridge_messages.h"
#include "content/common/npobject_stub.h"
#include "content/common/npobject_util.h" // For CreateNPVariantParam()
+#include "content/public/browser/browser_thread.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
JavaBridgeDispatcherHost::JavaBridgeDispatcherHost(
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 3ff3949..d3d5036 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -6,8 +6,8 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/audio_input_device_manager_event_handler.h"
+#include "content/public/browser/browser_thread.h"
#include "media/audio/audio_manager.h"
namespace media_stream {
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index 8892c93..dd6d303 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -7,9 +7,9 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/audio_input_device_manager.h"
#include "content/browser/renderer_host/media/audio_input_device_manager_event_handler.h"
+#include "content/test/test_browser_thread.h"
#include "media/audio/audio_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -85,7 +85,8 @@ class AudioInputDeviceManagerTest: public testing::Test {
virtual void SetUp() {
// The test must run on Browser::IO.
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
- io_thread_.reset(new BrowserThread(BrowserThread::IO, message_loop_.get()));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO,
+ message_loop_.get()));
manager_.reset(new media_stream::AudioInputDeviceManager());
audio_input_listener_.reset(new MockAudioInputDeviceManagerListener());
manager_->Register(audio_input_listener_.get());
@@ -127,7 +128,7 @@ class AudioInputDeviceManagerTest: public testing::Test {
message_loop_->Run();
}
scoped_ptr<MessageLoop> message_loop_;
- scoped_ptr<BrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
scoped_ptr<AudioInputDeviceManager> manager_;
scoped_ptr<MockAudioInputDeviceManagerListener> audio_input_listener_;
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.h b/content/browser/renderer_host/media/audio_input_renderer_host.h
index e1fb65f..dc3cffe 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.h
@@ -63,8 +63,8 @@
#include "base/process.h"
#include "base/shared_memory.h"
#include "content/browser/browser_message_filter.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/audio_input_device_manager_event_handler.h"
+#include "content/public/browser/browser_thread.h"
#include "media/audio/audio_input_controller.h"
#include "media/audio/audio_io.h"
#include "media/audio/simple_sources.h"
diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h
index d2308a5..2ec629f 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_renderer_host.h
@@ -61,8 +61,8 @@
#include "base/process.h"
#include "base/shared_memory.h"
#include "content/browser/browser_message_filter.h"
-#include "content/browser/browser_thread.h"
#include "content/common/content_export.h"
+#include "content/public/browser/browser_thread.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_output_controller.h"
#include "media/audio/simple_sources.h"
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index cbf28f1..36b29e2 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -8,11 +8,11 @@
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/sync_socket.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/mock_resource_context.h"
#include "content/browser/renderer_host/media/audio_renderer_host.h"
#include "content/browser/renderer_host/media/mock_media_observer.h"
#include "content/common/media/audio_messages.h"
+#include "content/test/test_browser_thread.h"
#include "ipc/ipc_message_utils.h"
#include "media/audio/audio_manager.h"
#include "media/audio/fake_audio_output_stream.h"
@@ -175,8 +175,10 @@ class AudioRendererHostTest : public testing::Test {
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
// Claim to be on both the UI and IO threads to pass all the DCHECKS.
- io_thread_.reset(new BrowserThread(BrowserThread::IO, message_loop_.get()));
- ui_thread_.reset(new BrowserThread(BrowserThread::UI, message_loop_.get()));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO,
+ message_loop_.get()));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ message_loop_.get()));
observer_.reset(new MockMediaObserver());
content::MockResourceContext* context =
@@ -357,8 +359,8 @@ class AudioRendererHostTest : public testing::Test {
scoped_ptr<MockMediaObserver> observer_;
scoped_refptr<MockAudioRendererHost> host_;
scoped_ptr<MessageLoop> message_loop_;
- scoped_ptr<BrowserThread> io_thread_;
- scoped_ptr<BrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererHostTest);
};
diff --git a/content/browser/renderer_host/media/media_stream_device_settings.cc b/content/browser/renderer_host/media/media_stream_device_settings.cc
index 54834e8..3edaf39 100644
--- a/content/browser/renderer_host/media/media_stream_device_settings.cc
+++ b/content/browser/renderer_host/media/media_stream_device_settings.cc
@@ -6,9 +6,9 @@
#include "base/stl_util.h"
#include "base/task.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/media_stream_settings_requester.h"
#include "content/common/media/media_stream_options.h"
+#include "content/public/browser/browser_thread.h"
namespace media_stream {
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index d9f7db7..a9afcee 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -13,6 +13,7 @@
#include "content/browser/resource_context.h"
#include "content/common/media/media_stream_messages.h"
#include "content/common/media/media_stream_options.h"
+#include "content/test/test_browser_thread.h"
#include "ipc/ipc_message_macros.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -141,9 +142,11 @@ class MediaStreamDispatcherHostTest : public testing::Test {
virtual void SetUp() {
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
// ResourceContext must be created on UI thread.
- ui_thread_.reset(new BrowserThread(BrowserThread::UI, message_loop_.get()));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ message_loop_.get()));
// MediaStreamManager must be created and called on IO thread.
- io_thread_.reset(new BrowserThread(BrowserThread::IO, message_loop_.get()));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO,
+ message_loop_.get()));
// Create a MediaStreamManager instance and hand over pointer to
// ResourceContext.
@@ -193,8 +196,8 @@ class MediaStreamDispatcherHostTest : public testing::Test {
scoped_refptr<MockMediaStreamDispatcherHost> host_;
scoped_ptr<MessageLoop> message_loop_;
- scoped_ptr<BrowserThread> ui_thread_;
- scoped_ptr<BrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
scoped_ptr<MediaStreamManager> media_stream_manager_;
};
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index ce216b4..8c0a1130 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -9,12 +9,12 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/rand_util.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/audio_input_device_manager.h"
#include "content/browser/renderer_host/media/media_stream_device_settings.h"
#include "content/browser/renderer_host/media/media_stream_requester.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
#include "content/common/media/media_stream_options.h"
+#include "content/public/browser/browser_thread.h"
namespace media_stream {
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index f30f2d5..286f7b4 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -6,9 +6,9 @@
#include "base/bind.h"
#include "base/stl_util.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
+#include "content/public/browser/browser_thread.h"
#include "media/base/yuv_convert.h"
// The number of TransportDIBs VideoCaptureController allocate.
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index cd8ac06..3bf4de0 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -12,13 +12,13 @@
#include "base/process_util.h"
#include "base/stl_util.h"
#include "base/stringprintf.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/mock_resource_context.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/video_capture_host.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
#include "content/browser/resource_context.h"
#include "content/common/media/video_capture_messages.h"
+#include "content/test/test_browser_thread.h"
#include "media/video/capture/video_capture_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -195,10 +195,12 @@ class VideoCaptureHostTest : public testing::Test {
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
// ResourceContext must be created on the UI thread.
- ui_thread_.reset(new BrowserThread(BrowserThread::UI, message_loop_.get()));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ message_loop_.get()));
// MediaStreamManager must be created on the IO thread.
- io_thread_.reset(new BrowserThread(BrowserThread::IO, message_loop_.get()));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO,
+ message_loop_.get()));
// Create a MediaStreamManager instance and hand over pointer to
// ResourceContext.
@@ -360,8 +362,8 @@ class VideoCaptureHostTest : public testing::Test {
private:
scoped_ptr<MessageLoop> message_loop_;
- scoped_ptr<BrowserThread> ui_thread_;
- scoped_ptr<BrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHostTest);
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 2143c91..3a7e87f 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
-#include "content/browser/browser_thread.h"
+#include "content/public/browser/browser_thread.h"
#include "media/video/capture/fake_video_capture_device.h"
#include "media/video/capture/video_capture_device.h"
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index e6ae7b2..1ec4991 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -10,10 +10,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/process_util.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/media/media_stream_provider.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
#include "content/common/media/media_stream_options.h"
+#include "content/test/test_browser_thread.h"
#include "media/video/capture/video_capture_device.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -82,7 +82,8 @@ class VideoCaptureManagerTest : public testing::Test {
virtual void SetUp() {
listener_.reset(new media_stream::MockMediaStreamProviderListener());
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
- io_thread_.reset(new BrowserThread(BrowserThread::IO, message_loop_.get()));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO,
+ message_loop_.get()));
vcm_.reset(new media_stream::VideoCaptureManager());
vcm_->UseFakeDevice();
vcm_->Register(listener_.get());
@@ -120,7 +121,7 @@ class VideoCaptureManagerTest : public testing::Test {
scoped_ptr<media_stream::VideoCaptureManager> vcm_;
scoped_ptr<media_stream::MockMediaStreamProviderListener> listener_;
scoped_ptr<MessageLoop> message_loop_;
- scoped_ptr<BrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
scoped_ptr<MockFrameObserver> frame_observer_;
private:
diff --git a/content/browser/renderer_host/pepper_file_message_filter.cc b/content/browser/renderer_host/pepper_file_message_filter.cc
index 3b37cfc..b288975 100644
--- a/content/browser/renderer_host/pepper_file_message_filter.cc
+++ b/content/browser/renderer_host/pepper_file_message_filter.cc
@@ -10,10 +10,10 @@
#include "base/platform_file.h"
#include "base/process_util.h"
#include "content/browser/browser_context.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/common/pepper_file_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_platform_file.h"
#include "webkit/plugins/ppapi/file_path.h"
diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc
index 3cc90ce..434a6d8 100644
--- a/content/browser/renderer_host/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper_message_filter.cc
@@ -19,17 +19,17 @@
#include "base/process_util.h"
#include "base/threading/worker_pool.h"
#include "base/values.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/font_list_async.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/resource_context.h"
#include "content/common/pepper_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "net/base/address_list.h"
#include "net/base/cert_verifier.h"
-#include "net/base/ip_endpoint.h"
#include "net/base/host_port_pair.h"
#include "net/base/host_resolver.h"
#include "net/base/io_buffer.h"
+#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/base/single_request_host_resolver.h"
#include "net/base/ssl_config_service.h"
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 0ee35cd..9222836 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -14,7 +14,6 @@
#include "base/threading/worker_pool.h"
#include "base/utf_string_conversions.h"
#include "content/browser/browser_context.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/download/download_types.h"
@@ -32,6 +31,7 @@
#include "content/common/child_process_messages.h"
#include "content/common/desktop_notification_messages.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
diff --git a/content/browser/renderer_host/render_process_host.cc b/content/browser/renderer_host/render_process_host.cc
index d9ce96b..251f3bb 100644
--- a/content/browser/renderer_host/render_process_host.cc
+++ b/content/browser/renderer_host/render_process_host.cc
@@ -8,11 +8,11 @@
#include "base/rand_util.h"
#include "base/sys_info.h"
#include "content/browser/browser_main.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/webui/web_ui_factory.h"
#include "content/common/child_process_info.h"
#include "content/common/content_constants.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
diff --git a/content/browser/renderer_host/render_view_host_notification_task.h b/content/browser/renderer_host/render_view_host_notification_task.h
index d30c28b..c14f476 100644
--- a/content/browser/renderer_host/render_view_host_notification_task.h
+++ b/content/browser/renderer_host/render_view_host_notification_task.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -13,9 +13,9 @@
#include "base/callback_old.h"
#include "base/task.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
+#include "content/public/browser/browser_thread.h"
// ----------------------------------------------------------------------------
diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc
index cbfa094..18a95e6 100644
--- a/content/browser/renderer_host/render_widget_helper.cc
+++ b/content/browser/renderer_host/render_widget_helper.cc
@@ -6,11 +6,11 @@
#include "base/eintr_wrapper.h"
#include "base/threading/thread.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/browser_thread.h"
// A Task used with InvokeLater that we hold a pointer to in pending_paints_.
// Instances are deleted by MessageLoop after it calls their Run method.
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 047e620..c5a5769 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -6,17 +6,17 @@
#include "base/memory/scoped_ptr.h"
#include "base/shared_memory.h"
#include "base/timer.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
-#include "content/public/browser/content_browser_client.h"
#include "content/test/test_browser_context.h"
+#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/canvas_skia.h"
@@ -527,7 +527,8 @@ TEST_F(RenderWidgetHostTest, GetBackingStore_RepaintAck) {
// Test that we don't paint when we're hidden, but we still send the ACK. Most
// of the rest of the painting is tested in the GetBackingStore* ones.
TEST_F(RenderWidgetHostTest, HiddenPaint) {
- BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
+ content::TestBrowserThread ui_thread(BrowserThread::UI,
+ MessageLoop::current());
// Hide the widget, it should have sent out a message to the renderer.
EXPECT_FALSE(host_->is_hidden_);
host_->WasHidden();
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 56f0c88..ed0ebac 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -11,14 +11,13 @@
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#import "base/mac/scoped_nsautorelease_pool.h"
-#include "base/metrics/histogram.h"
#import "base/memory/scoped_nsobject.h"
+#include "base/metrics/histogram.h"
#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#import "content/browser/accessibility/browser_accessibility_cocoa.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/mac/closure_blocks_leopard_compat.h"
@@ -34,14 +33,15 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/common/plugin_messages.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "skia/ext/platform_canvas.h"
-#import "third_party/mozilla/ComplexTextInputPanel.h"
-#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h"
+#import "third_party/mozilla/ComplexTextInputPanel.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/point.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
#include "ui/gfx/surface/io_surface_support_mac.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index c09939f..c6744fb 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -5,8 +5,8 @@
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/test_render_view_host.h"
+#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/test/cocoa_test_event_utils.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
@@ -88,8 +88,9 @@ TEST_F(RenderWidgetHostViewMacTest, Basic) {
// Regression test for http://crbug.com/60318
TEST_F(RenderWidgetHostViewMacTest, FocusAcceleratedView) {
// The accelerated view methods want to be called on the UI thread.
- scoped_ptr<BrowserThread> ui_thread_(
- new BrowserThread(BrowserThread::UI, MessageLoop::current()));
+ scoped_ptr<content::TestBrowserThread> ui_thread_(
+ new content::TestBrowserThread(BrowserThread::UI,
+ MessageLoop::current()));
int w = 400, h = 300;
gfx::PluginWindowHandle accelerated_handle = AddAcceleratedPluginView(w, h);
@@ -160,8 +161,9 @@ TEST_F(RenderWidgetHostViewMacTest, TakesFocusOnMouseDown) {
// Regression test for http://crbug.com/64256
TEST_F(RenderWidgetHostViewMacTest, TakesFocusOnMouseDownWithAcceleratedView) {
// The accelerated view methods want to be called on the UI thread.
- scoped_ptr<BrowserThread> ui_thread_(
- new BrowserThread(BrowserThread::UI, MessageLoop::current()));
+ scoped_ptr<content::TestBrowserThread> ui_thread_(
+ new content::TestBrowserThread(BrowserThread::UI,
+ MessageLoop::current()));
int w = 400, h = 300;
gfx::PluginWindowHandle accelerated_handle = AddAcceleratedPluginView(w, h);
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 340daad..6a7bf48 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -19,7 +19,6 @@
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/accessibility/browser_accessibility_state.h"
#include "content/browser/accessibility/browser_accessibility_win.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/plugin_process_host.h"
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/backing_store_win.h"
@@ -27,6 +26,7 @@
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/common/plugin_messages.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/notification_service.h"
diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
index 1b57703..919674f 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -10,7 +10,6 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/process_util.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/download/download_id.h"
#include "content/browser/mock_resource_context.h"
@@ -23,6 +22,7 @@
#include "content/common/resource_messages.h"
#include "content/common/resource_response.h"
#include "content/common/view_messages.h"
+#include "content/test/test_browser_thread.h"
#include "net/base/net_errors.h"
#include "net/base/upload_data.h"
#include "net/http/http_util.h"
@@ -385,8 +385,8 @@ class ResourceDispatcherHostTest : public testing::Test,
}
MessageLoopForIO message_loop_;
- BrowserThread ui_thread_;
- BrowserThread io_thread_;
+ content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread io_thread_;
scoped_refptr<ForwardingFilter> filter_;
ResourceDispatcherHost host_;
ResourceIPCAccumulator accum_;
diff --git a/content/browser/renderer_host/resource_handler.h b/content/browser/renderer_host/resource_handler.h
index 838f887..7fca15a 100644
--- a/content/browser/renderer_host/resource_handler.h
+++ b/content/browser/renderer_host/resource_handler.h
@@ -15,7 +15,7 @@
#include <string>
-#include "content/browser/browser_thread.h"
+#include "content/public/browser/browser_thread.h"
namespace net {
class IOBuffer;
diff --git a/content/browser/renderer_host/resource_message_filter.cc b/content/browser/renderer_host/resource_message_filter.cc
index 889a1c0..ba5b7c4 100644
--- a/content/browser/renderer_host/resource_message_filter.cc
+++ b/content/browser/renderer_host/resource_message_filter.cc
@@ -4,9 +4,9 @@
#include "content/browser/renderer_host/resource_message_filter.h"
-#include "content/browser/browser_thread.h"
-#include "content/browser/resource_context.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
+#include "content/browser/resource_context.h"
+#include "content/public/browser/browser_thread.h"
ResourceMessageFilter::ResourceMessageFilter(
int child_id,
diff --git a/content/browser/renderer_host/resource_queue.cc b/content/browser/renderer_host/resource_queue.cc
index 681c8ac..8821425 100644
--- a/content/browser/renderer_host/resource_queue.cc
+++ b/content/browser/renderer_host/resource_queue.cc
@@ -5,9 +5,9 @@
#include "content/browser/renderer_host/resource_queue.h"
#include "base/stl_util.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
+#include "content/public/browser/browser_thread.h"
ResourceQueueDelegate::~ResourceQueueDelegate() {
}
diff --git a/content/browser/renderer_host/resource_queue_unittest.cc b/content/browser/renderer_host/resource_queue_unittest.cc
index c743573..cc48914 100644
--- a/content/browser/renderer_host/resource_queue_unittest.cc
+++ b/content/browser/renderer_host/resource_queue_unittest.cc
@@ -4,12 +4,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/mock_resource_context.h"
#include "content/browser/renderer_host/dummy_resource_handler.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_queue.h"
+#include "content/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -123,8 +123,8 @@ class ResourceQueueTest : public testing::Test,
private:
MessageLoop message_loop_;
- BrowserThread ui_thread_;
- BrowserThread io_thread_;
+ content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread io_thread_;
};
TEST_F(ResourceQueueTest, Basic) {
diff --git a/content/browser/renderer_host/text_input_client_message_filter.mm b/content/browser/renderer_host/text_input_client_message_filter.mm
index 927a714..44824cb 100644
--- a/content/browser/renderer_host/text_input_client_message_filter.mm
+++ b/content/browser/renderer_host/text_input_client_message_filter.mm
@@ -6,11 +6,11 @@
#include "base/memory/scoped_nsobject.h"
#include "base/string16.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/renderer_host/text_input_client_mac.h"
#include "content/common/text_input_client_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_message_macros.h"
#include "ui/base/range/range.h"
#include "ui/gfx/rect.h"