summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 23:22:38 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 23:22:38 +0000
commit3e69bc89c813cc08f49cb8a9bc4b156603d9aa85 (patch)
tree34853b846a2ae76348fc475cba5aea84e6c3e3cc /content
parent4c087a63e39a26e3599d77ecaf0bf5089e10436d (diff)
downloadchromium_src-3e69bc89c813cc08f49cb8a9bc4b156603d9aa85.zip
chromium_src-3e69bc89c813cc08f49cb8a9bc4b156603d9aa85.tar.gz
chromium_src-3e69bc89c813cc08f49cb8a9bc4b156603d9aa85.tar.bz2
Get rid of render_messages.h and web_cache_manager.h. I moved the view source message to content since it belongs there now that devtools will be in content.
BUG=76697 Review URL: http://codereview.chromium.org/7081001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/DEPS4
-rw-r--r--content/browser/gpu/gpu_process_host.cc3
-rw-r--r--content/browser/ppapi_broker_process_host.cc3
-rw-r--r--content/browser/ppapi_plugin_process_host.cc1
-rw-r--r--content/browser/renderer_host/async_resource_handler.cc1
-rw-r--r--content/browser/renderer_host/browser_render_process_host.cc16
-rw-r--r--content/browser/renderer_host/browser_render_process_host.h2
-rw-r--r--content/browser/renderer_host/gpu_message_filter.cc1
-rw-r--r--content/browser/renderer_host/render_message_filter.cc1
-rw-r--r--content/browser/renderer_host/render_view_host.cc1
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.cc1
-rw-r--r--content/browser/renderer_host/render_widget_host_unittest.cc1
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_unittest.cc2
-rw-r--r--content/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--content/browser/renderer_host/sync_resource_handler.cc1
-rw-r--r--content/browser/site_instance_unittest.cc1
-rw-r--r--content/browser/tab_contents/navigation_controller_unittest.cc1
-rw-r--r--content/browser/tab_contents/render_view_host_manager.cc4
-rw-r--r--content/browser/tab_contents/render_view_host_manager_unittest.cc1
-rw-r--r--content/browser/tab_contents/tab_contents.cc5
-rw-r--r--content/browser/tab_contents/tab_contents_observer.cc3
-rw-r--r--content/browser/tab_contents/tab_contents_observer.h1
-rw-r--r--content/browser/webui/web_ui.cc1
-rw-r--r--content/common/view_messages.h3
24 files changed, 14 insertions, 46 deletions
diff --git a/content/browser/DEPS b/content/browser/DEPS
index 71e4407..198e200 100644
--- a/content/browser/DEPS
+++ b/content/browser/DEPS
@@ -14,6 +14,7 @@ include_rules = [
"+chrome/browser/browser_url_handler.h",
+ # http://crbug.com/84078
"+chrome/browser/debugger/devtools_manager.h",
"+chrome/browser/debugger/devtools_netlog_observer.h",
@@ -53,8 +54,6 @@ include_rules = [
"+chrome/browser/renderer_host/offline_resource_handler.h",
- "+chrome/browser/renderer_host/web_cache_manager.h",
-
# http://crbug.com/77089
"+chrome/browser/safe_browsing/safe_browsing_service.h",
"+chrome/browser/renderer_host/safe_browsing_resource_handler.h",
@@ -80,7 +79,6 @@ include_rules = [
"+chrome/common/chrome_switches.h",
"+chrome/common/chrome_paths.h",
"+chrome/common/logging_chrome.h",
- "+chrome/common/render_messages.h",
"+chrome/common/net/url_fetcher.h",
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index a54fe75..3cc8b31 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -11,13 +11,12 @@
#include "base/process_util.h"
#include "base/string_piece.h"
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/browser_thread.h"
#include "content/browser/gpu/gpu_data_manager.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
+#include "content/common/content_switches.h"
#include "content/common/gpu/gpu_messages.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_switches.h"
diff --git a/content/browser/ppapi_broker_process_host.cc b/content/browser/ppapi_broker_process_host.cc
index 57298de..b464250 100644
--- a/content/browser/ppapi_broker_process_host.cc
+++ b/content/browser/ppapi_broker_process_host.cc
@@ -8,10 +8,9 @@
#include "base/file_path.h"
#include "base/process_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/render_message_filter.h"
+#include "content/common/content_switches.h"
#include "content/common/pepper_plugin_registry.h"
#include "ipc/ipc_switches.h"
#include "ppapi/proxy/ppapi_messages.h"
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index f5a8885..2f6b7e5 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -9,7 +9,6 @@
#include "base/process_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/render_message_filter.h"
#include "content/common/pepper_plugin_registry.h"
diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc
index 7a62457..bb20ff1 100644
--- a/content/browser/renderer_host/async_resource_handler.cc
+++ b/content/browser/renderer_host/async_resource_handler.cc
@@ -12,7 +12,6 @@
#include "base/shared_memory.h"
#include "chrome/browser/debugger/devtools_netlog_observer.h"
#include "chrome/browser/net/load_timing_observer.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/host_zoom_map.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc
index bb51104..9d70e1c 100644
--- a/content/browser/renderer_host/browser_render_process_host.cc
+++ b/content/browser/renderer_host/browser_render_process_host.cc
@@ -28,11 +28,9 @@
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/appcache/appcache_dispatcher_host.h"
#include "content/browser/browser_child_process_host.h"
#include "content/browser/child_process_security_policy.h"
@@ -96,8 +94,6 @@
#include "content/common/section_util_win.h"
#endif
-using WebKit::WebCache;
-
#include "third_party/skia/include/core/SkBitmap.h"
// TODO(mpcomplete): Remove this after fixing
@@ -193,7 +189,6 @@ BrowserRenderProcessHost::BrowserRenderProcessHost(Profile* profile)
is_initialized_(false) {
widget_helper_ = new RenderWidgetHelper();
- WebCacheManager::GetInstance()->Add(id());
ChildProcessSecurityPolicy::GetInstance()->Add(id());
// Grant most file permissions to this renderer.
@@ -224,7 +219,6 @@ BrowserRenderProcessHost::BrowserRenderProcessHost(Profile* profile)
BrowserRenderProcessHost::~BrowserRenderProcessHost() {
VLOG_IF(1, g_log_bug53991) << "~BrowserRenderProcessHost: " << this;
- WebCacheManager::GetInstance()->Remove(id());
ChildProcessSecurityPolicy::GetInstance()->Remove(id());
// We may have some unsent messages at this point, but that's OK.
@@ -785,8 +779,6 @@ bool BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest,
OnShutdownRequest)
- IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats,
- OnUpdatedCacheStats)
IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged,
SuddenTerminationChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction,
@@ -864,7 +856,6 @@ void BrowserRenderProcessHost::OnChannelError() {
Source<RenderProcessHost>(this),
Details<RendererClosedDetails>(&details));
- WebCacheManager::GetInstance()->Remove(id());
child_process_launcher_.reset();
channel_.reset();
@@ -897,11 +888,6 @@ void BrowserRenderProcessHost::OnShutdownRequest() {
Send(new ChildProcessMsg_Shutdown());
}
-void BrowserRenderProcessHost::OnUpdatedCacheStats(
- const WebCache::UsageStats& stats) {
- WebCacheManager::GetInstance()->ObserveStats(id(), stats);
-}
-
void BrowserRenderProcessHost::SuddenTerminationChanged(bool enabled) {
set_sudden_termination_allowed(enabled);
}
@@ -939,8 +925,6 @@ void BrowserRenderProcessHost::OnProcessLaunched() {
if (child_process_launcher_.get())
child_process_launcher_->SetProcessBackgrounded(backgrounded_);
- Send(new ViewMsg_SetIsIncognitoProcess(profile()->IsOffTheRecord()));
-
if (max_page_id_ != -1)
Send(new ViewMsg_SetNextPageID(max_page_id_ + 1));
diff --git a/content/browser/renderer_host/browser_render_process_host.h b/content/browser/renderer_host/browser_render_process_host.h
index f8b63de..4cf6a4c 100644
--- a/content/browser/renderer_host/browser_render_process_host.h
+++ b/content/browser/renderer_host/browser_render_process_host.h
@@ -15,7 +15,6 @@
#include "base/timer.h"
#include "content/browser/child_process_launcher.h"
#include "content/browser/renderer_host/render_process_host.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
#include "ui/gfx/surface/transport_dib.h"
class CommandLine;
@@ -82,7 +81,6 @@ class BrowserRenderProcessHost : public RenderProcessHost,
// Control message handlers.
void OnShutdownRequest();
- void OnUpdatedCacheStats(const WebKit::WebCache::UsageStats& stats);
void SuddenTerminationChanged(bool enabled);
void OnUserMetricsRecordAction(const std::string& action);
diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc
index 5a98c13..ca5647e 100644
--- a/content/browser/renderer_host/gpu_message_filter.cc
+++ b/content/browser/renderer_host/gpu_message_filter.cc
@@ -9,7 +9,6 @@
#include "content/browser/renderer_host/gpu_message_filter.h"
#include "base/callback.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/gpu/gpu_messages.h"
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index e78cb12..efdb533 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -23,7 +23,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/content_browser_client.h"
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 96eb779..406605b 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -16,7 +16,6 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_message_filter.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/content_browser_client.h"
diff --git a/content/browser/renderer_host/render_view_host_delegate.cc b/content/browser/renderer_host/render_view_host_delegate.cc
index 46b7bfa..d520a2c4 100644
--- a/content/browser/renderer_host/render_view_host_delegate.cc
+++ b/content/browser/renderer_host/render_view_host_delegate.cc
@@ -5,7 +5,6 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "base/memory/singleton.h"
-#include "chrome/common/render_messages.h"
#include "content/common/renderer_preferences.h"
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 2daeac7..ab7ea54 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -7,7 +7,6 @@
#include "base/shared_memory.h"
#include "base/timer.h"
#include "build/build_config.h"
-#include "chrome/common/render_messages.h"
#include "chrome/test/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/backing_store.h"
diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
index 0f0ca69..3ebbfd8 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -9,7 +9,6 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/process_util.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/mock_resource_context.h"
@@ -20,6 +19,7 @@
#include "content/browser/renderer_host/resource_message_filter.h"
#include "content/common/resource_messages.h"
#include "content/common/resource_response.h"
+#include "content/common/view_messages.h"
#include "net/base/net_errors.h"
#include "net/base/upload_data.h"
#include "net/http/http_util.h"
diff --git a/content/browser/renderer_host/resource_message_filter.cc b/content/browser/renderer_host/resource_message_filter.cc
index 3729e9e..889a1c0 100644
--- a/content/browser/renderer_host/resource_message_filter.cc
+++ b/content/browser/renderer_host/resource_message_filter.cc
@@ -4,8 +4,6 @@
#include "content/browser/renderer_host/resource_message_filter.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/browser_thread.h"
#include "content/browser/resource_context.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
diff --git a/content/browser/renderer_host/sync_resource_handler.cc b/content/browser/renderer_host/sync_resource_handler.cc
index a5d3418..6d34094 100644
--- a/content/browser/renderer_host/sync_resource_handler.cc
+++ b/content/browser/renderer_host/sync_resource_handler.cc
@@ -7,7 +7,6 @@
#include "base/logging.h"
#include "chrome/browser/debugger/devtools_netlog_observer.h"
#include "chrome/browser/net/load_timing_observer.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_message_filter.h"
diff --git a/content/browser/site_instance_unittest.cc b/content/browser/site_instance_unittest.cc
index 25b9f6a..63533db 100644
--- a/content/browser/site_instance_unittest.cc
+++ b/content/browser/site_instance_unittest.cc
@@ -5,7 +5,6 @@
#include "base/stl_util-inl.h"
#include "base/string16.h"
#include "chrome/common/chrome_constants.h"
-#include "chrome/common/render_messages.h"
#include "chrome/test/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "content/browser/browsing_instance.h"
diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc
index 73264c3..29b6cdf 100644
--- a/content/browser/tab_contents/navigation_controller_unittest.cc
+++ b/content/browser/tab_contents/navigation_controller_unittest.cc
@@ -16,7 +16,6 @@
// #include "chrome/browser/sessions/session_service_factory.h"
// #include "chrome/browser/sessions/session_service_test_helper.h"
#include "chrome/browser/sessions/session_types.h"
-#include "chrome/common/render_messages.h"
#include "chrome/test/test_notification_tracker.h"
#include "chrome/test/testing_profile.h"
#include "content/browser/renderer_host/test_render_view_host.h"
diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc
index d827a087..48133e4 100644
--- a/content/browser/tab_contents/render_view_host_manager.cc
+++ b/content/browser/tab_contents/render_view_host_manager.cc
@@ -6,9 +6,6 @@
#include "base/command_line.h"
#include "base/logging.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/content_browser_client.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
@@ -21,6 +18,7 @@
#include "content/browser/webui/web_ui.h"
#include "content/browser/webui/web_ui_factory.h"
#include "content/common/content_client.h"
+#include "content/common/content_switches.h"
#include "content/common/notification_service.h"
#include "content/common/notification_type.h"
#include "content/common/url_constants.h"
diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc
index 6e6ca41..1e31d92 100644
--- a/content/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "chrome/browser/browser_url_handler.h"
-#include "chrome/common/render_messages.h"
#include "chrome/test/test_notification_tracker.h"
#include "chrome/test/testing_profile.h"
#include "content/browser/browser_thread.h"
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index d4708cc..9b45752 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -19,11 +19,9 @@
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/common/chrome_constants.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/content_browser_client.h"
#include "content/browser/host_zoom_map.h"
@@ -430,8 +428,9 @@ void TabContents::DidBecomeSelected() {
#endif
}
- WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id());
last_selected_time_ = base::TimeTicks::Now();
+
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_, DidBecomeSelected());
}
void TabContents::WasHidden() {
diff --git a/content/browser/tab_contents/tab_contents_observer.cc b/content/browser/tab_contents/tab_contents_observer.cc
index 0a80847..03f8f75 100644
--- a/content/browser/tab_contents/tab_contents_observer.cc
+++ b/content/browser/tab_contents/tab_contents_observer.cc
@@ -78,6 +78,9 @@ void TabContentsObserver::DidFinishLoad(int64 frame_id) {
void TabContentsObserver::DidGetUserGesture() {
}
+void TabContentsObserver::DidBecomeSelected() {
+}
+
void TabContentsObserver::DidStartLoading() {
}
diff --git a/content/browser/tab_contents/tab_contents_observer.h b/content/browser/tab_contents/tab_contents_observer.h
index 7dc51fe..e1b11c9 100644
--- a/content/browser/tab_contents/tab_contents_observer.h
+++ b/content/browser/tab_contents/tab_contents_observer.h
@@ -72,6 +72,7 @@ class TabContentsObserver : public IPC::Channel::Listener,
virtual void DocumentLoadedInFrame(int64 frame_id);
virtual void DidFinishLoad(int64 frame_id);
virtual void DidGetUserGesture();
+ virtual void DidBecomeSelected();
virtual void DidStartLoading();
virtual void DidStopLoading();
diff --git a/content/browser/webui/web_ui.cc b/content/browser/webui/web_ui.cc
index bc3abc7..b9b0b89 100644
--- a/content/browser/webui/web_ui.cc
+++ b/content/browser/webui/web_ui.cc
@@ -10,7 +10,6 @@
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 7788539..1233c22 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -1186,6 +1186,9 @@ IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
// Asks the renderer to send back FPS.
IPC_MESSAGE_ROUTED0(ViewMsg_GetFPS)
+// Used to instruct the RenderView to go into "view source" mode.
+IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
+
// Messages sent from the renderer to the browser.