summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 21:52:32 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 21:52:32 +0000
commit4604d1f4944206f24e864c71e29bc08b4d9500af (patch)
tree8dc2637b180b5c6e8a21b1984afb1a7bfa17c10b /chrome/renderer
parenta04f125f5fe5bbc56a3feaac4121a29452becedf (diff)
downloadchromium_src-4604d1f4944206f24e864c71e29bc08b4d9500af.zip
chromium_src-4604d1f4944206f24e864c71e29bc08b4d9500af.tar.gz
chromium_src-4604d1f4944206f24e864c71e29bc08b4d9500af.tar.bz2
RSS feed support (part 1), 2nd attempt.
Part 1 is RSS feed auto-discovery. This will parse the web page header to find the feeds in the document and notify the browser to display the RSS icon in the toolbar. You can click on the icon, but it will just navigate to the first feed on the page, which (unless it has been designed to be browser friendly) will just dump XML as text on the user. For this reason I have disabled the code that makes the RSS icon appear and intend to enable it when we have a good landing page to display the XML. Review URL: http://codereview.chromium.org/46055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc10
-rw-r--r--chrome/renderer/render_view.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 8af74f5..8e7a45e 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1219,6 +1219,9 @@ void RenderView::DidStopLoading(WebView* webview) {
if (!favicon_url.is_empty())
Send(new ViewHostMsg_UpdateFavIconURL(routing_id_, page_id_, favicon_url));
+ // Update the list of available feeds.
+ UpdateFeedList(webview->GetMainFrame()->GetFeedList());
+
AddGURLSearchProvider(webview->GetMainFrame()->GetOSDDURL(),
true); // autodetected
@@ -1696,6 +1699,13 @@ void RenderView::AddGURLSearchProvider(const GURL& osd_url, bool autodetected) {
autodetected));
}
+void RenderView::UpdateFeedList(scoped_refptr<FeedList> feedlist) {
+ ViewHostMsg_UpdateFeedList_Params params;
+ params.page_id = page_id_;
+ params.feedlist = feedlist;
+ Send(new ViewHostMsg_UpdateFeedList(routing_id_, params));
+}
+
bool RenderView::RunBeforeUnloadConfirm(WebFrame* webframe,
const std::wstring& message) {
bool success = false;
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 29c262d7..8973346 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -29,6 +29,7 @@
#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/glue/console_message_level.h"
#include "webkit/glue/dom_serializer_delegate.h"
+#include "webkit/glue/feed.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/password_form_dom_manager.h"
#include "webkit/glue/webview_delegate.h"
@@ -431,6 +432,9 @@ class RenderView : public RenderWidget,
// keyword search.
void AddGURLSearchProvider(const GURL& osd_url, bool autodetected);
+ // Update the feed list.
+ void UpdateFeedList(scoped_refptr<FeedList> feedlist);
+
// Tells the browser process to navigate to a back/forward entry at the given
// offset from current.
void GoToEntryAtOffset(int offset);