Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: chrome/renderer/render_view.cc

Issue 43109: RSS feed support (part 1)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/test/test_location_bar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1215
1216 // NOTE: For now we're doing the safest thing, and sending out notification 1216 // NOTE: For now we're doing the safest thing, and sending out notification
1217 // when done loading. This currently isn't an issue as the favicon is only 1217 // when done loading. This currently isn't an issue as the favicon is only
1218 // displayed when done loading. Ideally we would send notification when 1218 // displayed when done loading. Ideally we would send notification when
1219 // finished parsing the head, but webkit doesn't support that yet. 1219 // finished parsing the head, but webkit doesn't support that yet.
1220 // The feed discovery code would also benefit from access to the head. 1220 // The feed discovery code would also benefit from access to the head.
1221 GURL favicon_url(webview->GetMainFrame()->GetFavIconURL()); 1221 GURL favicon_url(webview->GetMainFrame()->GetFavIconURL());
1222 if (!favicon_url.is_empty()) 1222 if (!favicon_url.is_empty())
1223 Send(new ViewHostMsg_UpdateFavIconURL(routing_id_, page_id_, favicon_url)); 1223 Send(new ViewHostMsg_UpdateFavIconURL(routing_id_, page_id_, favicon_url));
1224 1224
1225 // Update the list of available feeds.
1226 UpdateFeedList(webview->GetMainFrame()->GetFeedList());
1227
1225 AddGURLSearchProvider(webview->GetMainFrame()->GetOSDDURL(), 1228 AddGURLSearchProvider(webview->GetMainFrame()->GetOSDDURL(),
1226 true); // autodetected 1229 true); // autodetected
1227 1230
1228 Send(new ViewHostMsg_DidStopLoading(routing_id_, page_id_)); 1231 Send(new ViewHostMsg_DidStopLoading(routing_id_, page_id_));
1229 1232
1230 MessageLoop::current()->PostDelayedTask(FROM_HERE, 1233 MessageLoop::current()->PostDelayedTask(FROM_HERE,
1231 method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_, 1234 method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_,
1232 false), 1235 false),
1233 kDelayForCaptureMs); 1236 kDelayForCaptureMs);
1234 1237
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 1695
1693 return success; 1696 return success;
1694 } 1697 }
1695 1698
1696 void RenderView::AddGURLSearchProvider(const GURL& osd_url, bool autodetected) { 1699 void RenderView::AddGURLSearchProvider(const GURL& osd_url, bool autodetected) {
1697 if (!osd_url.is_empty()) 1700 if (!osd_url.is_empty())
1698 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url, 1701 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url,
1699 autodetected)); 1702 autodetected));
1700 } 1703 }
1701 1704
1705 void RenderView::UpdateFeedList(scoped_refptr<FeedList> feedlist) {
1706 ViewHostMsg_UpdateFeedList_Params params;
1707 params.page_id = page_id_;
1708 params.feedlist = feedlist;
1709 Send(new ViewHostMsg_UpdateFeedList(routing_id_, params));
1710 }
1711
1702 bool RenderView::RunBeforeUnloadConfirm(WebFrame* webframe, 1712 bool RenderView::RunBeforeUnloadConfirm(WebFrame* webframe,
1703 const std::wstring& message) { 1713 const std::wstring& message) {
1704 bool success = false; 1714 bool success = false;
1705 // This is an ignored return value, but is included so we can accept the same 1715 // This is an ignored return value, but is included so we can accept the same
1706 // response as RunJavaScriptMessage. 1716 // response as RunJavaScriptMessage.
1707 std::wstring ignored_result; 1717 std::wstring ignored_result;
1708 IPC::SyncMessage* msg = new ViewHostMsg_RunBeforeUnloadConfirm( 1718 IPC::SyncMessage* msg = new ViewHostMsg_RunBeforeUnloadConfirm(
1709 routing_id_, webframe->GetURL(), message, &success, &ignored_result); 1719 routing_id_, webframe->GetURL(), message, &success, &ignored_result);
1710 1720
1711 msg->set_pump_messages_event(modal_dialog_event_.get()); 1721 msg->set_pump_messages_event(modal_dialog_event_.get());
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2969 DCHECK(audio_renderers_.Lookup(stream_id) != NULL); 2979 DCHECK(audio_renderers_.Lookup(stream_id) != NULL);
2970 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right)); 2980 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right));
2971 } 2981 }
2972 2982
2973 void RenderView::OnResize(const gfx::Size& new_size, 2983 void RenderView::OnResize(const gfx::Size& new_size,
2974 const gfx::Rect& resizer_rect) { 2984 const gfx::Rect& resizer_rect) {
2975 if (webview()) 2985 if (webview())
2976 webview()->HideAutofillPopup(); 2986 webview()->HideAutofillPopup();
2977 RenderWidget::OnResize(new_size, resizer_rect); 2987 RenderWidget::OnResize(new_size, resizer_rect);
2978 } 2988 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/test/test_location_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698