diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 21:52:32 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 21:52:32 +0000 |
commit | 4604d1f4944206f24e864c71e29bc08b4d9500af (patch) | |
tree | 8dc2637b180b5c6e8a21b1984afb1a7bfa17c10b /chrome/browser/toolbar_model.cc | |
parent | a04f125f5fe5bbc56a3feaac4121a29452becedf (diff) | |
download | chromium_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/browser/toolbar_model.cc')
-rw-r--r-- | chrome/browser/toolbar_model.cc | 16 |
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. |