summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-08 21:23:10 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-08 21:23:10 +0000
commit7fc4bbb04ebb386aee93758d869755a7ace7b93b (patch)
tree3a999bc191597d43e441102824b6fe03e0805dea /content
parent7b924a4c4e7aba2ddf0794ff22887d814360d43c (diff)
downloadchromium_src-7fc4bbb04ebb386aee93758d869755a7ace7b93b.zip
chromium_src-7fc4bbb04ebb386aee93758d869755a7ace7b93b.tar.gz
chromium_src-7fc4bbb04ebb386aee93758d869755a7ace7b93b.tar.bz2
Move the ViewHostMsg_AppCacheAccessed message handling out of Chrome and replace it with a notification call
on the TabContentsObserver interface. This is fine as this message is just a notification that the app cache was accessed. Continuing changes to get rid of the pattern of IPC messages spanning across content and chrome. BUG=87335 TEST=No change in functionality Review URL: http://codereview.chromium.org/7857003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/tab_contents/tab_contents.cc8
-rw-r--r--content/browser/tab_contents/tab_contents.h1
-rw-r--r--content/browser/tab_contents/tab_contents_observer.cc4
-rw-r--r--content/browser/tab_contents/tab_contents_observer.h2
4 files changed, 15 insertions, 0 deletions
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 302f99f..061846b 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -308,6 +308,7 @@ bool TabContents::OnMessageReceived(const IPC::Message& message) {
OnWebIntentDispatch)
IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -1156,6 +1157,13 @@ void TabContents::OnCrashedPlugin(const FilePath& plugin_path) {
delegate()->CrashedPlugin(this, plugin_path);
}
+void TabContents::OnAppCacheAccessed(const GURL& manifest_url,
+ bool blocked_by_policy) {
+ // Notify observers about navigation.
+ FOR_EACH_OBSERVER(TabContentsObserver, observers_,
+ AppCacheAccessed(manifest_url, blocked_by_policy));
+}
+
// Notifies the RenderWidgetHost instance about the fact that the page is
// loading, or done loading and calls the base implementation.
void TabContents::SetIsLoading(bool is_loading,
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 072bc29..8b8e4ed 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -581,6 +581,7 @@ class TabContents : public PageNavigator,
const gfx::Rect& selection_rect, int active_match_ordinal,
bool final_update);
void OnCrashedPlugin(const FilePath& plugin_path);
+ void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy);
// Changes the IsLoading state and notifies delegate as needed
// |details| is used to provide details on the load that just finished
diff --git a/content/browser/tab_contents/tab_contents_observer.cc b/content/browser/tab_contents/tab_contents_observer.cc
index 6ce40e8..927965a 100644
--- a/content/browser/tab_contents/tab_contents_observer.cc
+++ b/content/browser/tab_contents/tab_contents_observer.cc
@@ -82,6 +82,10 @@ void TabContentsObserver::DidOpenURL(const GURL& url,
PageTransition::Type transition) {
}
+void TabContentsObserver::AppCacheAccessed(const GURL& manifest_url,
+ bool blocked_by_policy) {
+}
+
TabContentsObserver::TabContentsObserver(TabContents* tab_contents)
: tab_contents_(NULL), routing_id_(MSG_ROUTING_NONE) {
Observe(tab_contents);
diff --git a/content/browser/tab_contents/tab_contents_observer.h b/content/browser/tab_contents/tab_contents_observer.h
index 1700cf4..e3d0405 100644
--- a/content/browser/tab_contents/tab_contents_observer.h
+++ b/content/browser/tab_contents/tab_contents_observer.h
@@ -62,6 +62,8 @@ class TabContentsObserver : public IPC::Channel::Listener,
WindowOpenDisposition disposition,
PageTransition::Type transition);
+ virtual void AppCacheAccessed(const GURL& manifest_url,
+ bool blocked_by_policy);
#if 0
// For unifying with delegate...