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

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

Issue 46055: RSS feed support (part 1), 2nd attempt (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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 1212
1213 // NOTE: For now we're doing the safest thing, and sending out notification 1213 // NOTE: For now we're doing the safest thing, and sending out notification
1214 // when done loading. This currently isn't an issue as the favicon is only 1214 // when done loading. This currently isn't an issue as the favicon is only
1215 // displayed when done loading. Ideally we would send notification when 1215 // displayed when done loading. Ideally we would send notification when
1216 // finished parsing the head, but webkit doesn't support that yet. 1216 // finished parsing the head, but webkit doesn't support that yet.
1217 // The feed discovery code would also benefit from access to the head. 1217 // The feed discovery code would also benefit from access to the head.
1218 GURL favicon_url(webview->GetMainFrame()->GetFavIconURL()); 1218 GURL favicon_url(webview->GetMainFrame()->GetFavIconURL());
1219 if (!favicon_url.is_empty()) 1219 if (!favicon_url.is_empty())
1220 Send(new ViewHostMsg_UpdateFavIconURL(routing_id_, page_id_, favicon_url)); 1220 Send(new ViewHostMsg_UpdateFavIconURL(routing_id_, page_id_, favicon_url));
1221 1221
1222 // Update the list of available feeds.
1223 UpdateFeedList(webview->GetMainFrame()->GetFeedList());
1224
1222 AddGURLSearchProvider(webview->GetMainFrame()->GetOSDDURL(), 1225 AddGURLSearchProvider(webview->GetMainFrame()->GetOSDDURL(),
1223 true); // autodetected 1226 true); // autodetected
1224 1227
1225 Send(new ViewHostMsg_DidStopLoading(routing_id_, page_id_)); 1228 Send(new ViewHostMsg_DidStopLoading(routing_id_, page_id_));
1226 1229
1227 MessageLoop::current()->PostDelayedTask(FROM_HERE, 1230 MessageLoop::current()->PostDelayedTask(FROM_HERE,
1228 method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_, 1231 method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_,
1229 false), 1232 false),
1230 kDelayForCaptureMs); 1233 kDelayForCaptureMs);
1231 1234
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 1692
1690 return success; 1693 return success;
1691 } 1694 }
1692 1695
1693 void RenderView::AddGURLSearchProvider(const GURL& osd_url, bool autodetected) { 1696 void RenderView::AddGURLSearchProvider(const GURL& osd_url, bool autodetected) {
1694 if (!osd_url.is_empty()) 1697 if (!osd_url.is_empty())
1695 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url, 1698 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url,
1696 autodetected)); 1699 autodetected));
1697 } 1700 }
1698 1701
1702 void RenderView::UpdateFeedList(scoped_refptr<FeedList> feedlist) {
1703 ViewHostMsg_UpdateFeedList_Params params;
1704 params.page_id = page_id_;
1705 params.feedlist = feedlist;
1706 Send(new ViewHostMsg_UpdateFeedList(routing_id_, params));
1707 }
1708
1699 bool RenderView::RunBeforeUnloadConfirm(WebFrame* webframe, 1709 bool RenderView::RunBeforeUnloadConfirm(WebFrame* webframe,
1700 const std::wstring& message) { 1710 const std::wstring& message) {
1701 bool success = false; 1711 bool success = false;
1702 // This is an ignored return value, but is included so we can accept the same 1712 // This is an ignored return value, but is included so we can accept the same
1703 // response as RunJavaScriptMessage. 1713 // response as RunJavaScriptMessage.
1704 std::wstring ignored_result; 1714 std::wstring ignored_result;
1705 IPC::SyncMessage* msg = new ViewHostMsg_RunBeforeUnloadConfirm( 1715 IPC::SyncMessage* msg = new ViewHostMsg_RunBeforeUnloadConfirm(
1706 routing_id_, webframe->GetURL(), message, &success, &ignored_result); 1716 routing_id_, webframe->GetURL(), message, &success, &ignored_result);
1707 1717
1708 msg->set_pump_messages_event(modal_dialog_event_.get()); 1718 msg->set_pump_messages_event(modal_dialog_event_.get());
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 DCHECK(audio_renderers_.Lookup(stream_id) != NULL); 2955 DCHECK(audio_renderers_.Lookup(stream_id) != NULL);
2946 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right)); 2956 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right));
2947 } 2957 }
2948 2958
2949 void RenderView::OnResize(const gfx::Size& new_size, 2959 void RenderView::OnResize(const gfx::Size& new_size,
2950 const gfx::Rect& resizer_rect) { 2960 const gfx::Rect& resizer_rect) {
2951 if (webview()) 2961 if (webview())
2952 webview()->HideAutofillPopup(); 2962 webview()->HideAutofillPopup();
2953 RenderWidget::OnResize(new_size, resizer_rect); 2963 RenderWidget::OnResize(new_size, resizer_rect);
2954 } 2964 }
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