summaryrefslogtreecommitdiffstats
path: root/chrome/browser/toolbar_model.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 17:03:07 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 17:03:07 +0000
commit38c0e99c382e4bf5ba04720f207338dba103f67f (patch)
tree6919b371afc1c5141388a90f8d09d6e199b9d0d3 /chrome/browser/toolbar_model.cc
parent1540cd50af4875ae49a4012015bac43ae17c2258 (diff)
downloadchromium_src-38c0e99c382e4bf5ba04720f207338dba103f67f.zip
chromium_src-38c0e99c382e4bf5ba04720f207338dba103f67f.tar.gz
chromium_src-38c0e99c382e4bf5ba04720f207338dba103f67f.tar.bz2
RSS feed support (part 1)
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/43109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11640 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/toolbar_model.cc')
-rw-r--r--chrome/browser/toolbar_model.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc
index 93a224c..6661fb0 100644
--- a/chrome/browser/toolbar_model.cc
+++ b/chrome/browser/toolbar_model.cc
@@ -15,6 +15,7 @@
#include "chrome/common/pref_service.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
+#include "webkit/glue/feed.h"
ToolbarModel::ToolbarModel() : input_in_progress_(false) {
@@ -107,6 +108,21 @@ ToolbarModel::Icon ToolbarModel::GetIcon() {
}
}
+scoped_refptr<FeedList> ToolbarModel::GetFeedList() {
+ if (input_in_progress_)
+ return NULL;
+
+ NavigationController* navigation_controller = GetNavigationController();
+ if (!navigation_controller) // We might not have a controller on init.
+ return NULL;
+
+ NavigationEntry* entry = navigation_controller->GetActiveEntry();
+ if (!entry)
+ return NULL;
+
+ return entry->feedlist();
+}
+
void ToolbarModel::GetIconHoverText(std::wstring* text, SkColor* text_color) {
static const SkColor kOKHttpsInfoBubbleTextColor =
SkColorSetRGB(0, 153, 51); // Green.