summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/appcache/appcache_frontend_proxy.cc6
-rw-r--r--chrome/browser/appcache/appcache_frontend_proxy.h2
-rw-r--r--chrome/common/appcache/appcache_dispatcher.cc8
-rw-r--r--chrome/common/appcache/appcache_dispatcher.h1
-rwxr-xr-xchrome/common/render_messages_internal.h6
5 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/appcache/appcache_frontend_proxy.cc b/chrome/browser/appcache/appcache_frontend_proxy.cc
index 89822d0..fe39029 100644
--- a/chrome/browser/appcache/appcache_frontend_proxy.cc
+++ b/chrome/browser/appcache/appcache_frontend_proxy.cc
@@ -29,6 +29,12 @@ void AppCacheFrontendProxy::OnProgressEventRaised(
host_ids, url, num_total, num_complete));
}
+void AppCacheFrontendProxy::OnLogMessage(int host_id,
+ appcache::LogLevel log_level,
+ const std::string& message) {
+ sender_->Send(new AppCacheMsg_LogMessage(host_id, log_level, message));
+}
+
void AppCacheFrontendProxy::OnContentBlocked(int host_id) {
sender_->Send(new AppCacheMsg_ContentBlocked(host_id));
}
diff --git a/chrome/browser/appcache/appcache_frontend_proxy.h b/chrome/browser/appcache/appcache_frontend_proxy.h
index 2b6bc2e..90b9446 100644
--- a/chrome/browser/appcache/appcache_frontend_proxy.h
+++ b/chrome/browser/appcache/appcache_frontend_proxy.h
@@ -27,6 +27,8 @@ class AppCacheFrontendProxy : public appcache::AppCacheFrontend {
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url,
int num_total, int num_complete);
+ virtual void OnLogMessage(int host_id, appcache::LogLevel log_level,
+ const std::string& message);
virtual void OnContentBlocked(int host_id);
private:
diff --git a/chrome/common/appcache/appcache_dispatcher.cc b/chrome/common/appcache/appcache_dispatcher.cc
index 41d027a..97e1cba 100644
--- a/chrome/common/appcache/appcache_dispatcher.cc
+++ b/chrome/common/appcache/appcache_dispatcher.cc
@@ -14,6 +14,7 @@ bool AppCacheDispatcher::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(AppCacheMsg_StatusChanged, OnStatusChanged)
IPC_MESSAGE_HANDLER(AppCacheMsg_EventRaised, OnEventRaised)
IPC_MESSAGE_HANDLER(AppCacheMsg_ProgressEventRaised, OnProgressEventRaised)
+ IPC_MESSAGE_HANDLER(AppCacheMsg_LogMessage, OnLogMessage)
IPC_MESSAGE_HANDLER(AppCacheMsg_ContentBlocked, OnContentBlocked)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -40,6 +41,13 @@ void AppCacheDispatcher::OnProgressEventRaised(
const GURL& url, int num_total, int num_complete) {
frontend_impl_.OnProgressEventRaised(host_ids, url, num_total, num_complete);
}
+
+void AppCacheDispatcher::OnLogMessage(
+ int host_id, int log_level, const std::string& message) {
+ frontend_impl_.OnLogMessage(
+ host_id, static_cast<appcache::LogLevel>(log_level), message);
+}
+
void AppCacheDispatcher::OnContentBlocked(int host_id) {
frontend_impl_.OnContentBlocked(host_id);
}
diff --git a/chrome/common/appcache/appcache_dispatcher.h b/chrome/common/appcache/appcache_dispatcher.h
index 0ecd328..39cb225 100644
--- a/chrome/common/appcache/appcache_dispatcher.h
+++ b/chrome/common/appcache/appcache_dispatcher.h
@@ -33,6 +33,7 @@ class AppCacheDispatcher {
appcache::EventID event_id);
void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url, int num_total, int num_complete);
+ void OnLogMessage(int host_id, int log_level, const std::string& message);
void OnContentBlocked(int host_id);
AppCacheBackendProxy backend_proxy_;
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 7d38c3a..df043e7 100755
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -633,6 +633,12 @@ IPC_BEGIN_MESSAGES(View)
int /* total */,
int /* complete */)
+ // Notifies the renderer of an AppCache logging message.
+ IPC_MESSAGE_CONTROL3(AppCacheMsg_LogMessage,
+ int /* host_id */,
+ int /* log_level */,
+ std::string /* message */)
+
// Notifies the renderer of the fact that AppCache access was blocked.
IPC_MESSAGE_CONTROL1(AppCacheMsg_ContentBlocked,
int /* host_id */)