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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 23556003: Implement about:tracing UI for the sampling profiler (Chromium part) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « content/public/browser/trace_subscriber.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 } 2113 }
2114 2114
2115 // Tell the embedding application that the title of the active page has changed 2115 // Tell the embedding application that the title of the active page has changed
2116 void RenderViewImpl::UpdateTitle(WebFrame* frame, 2116 void RenderViewImpl::UpdateTitle(WebFrame* frame,
2117 const string16& title, 2117 const string16& title,
2118 WebTextDirection title_direction) { 2118 WebTextDirection title_direction) {
2119 // Ignore all but top level navigations. 2119 // Ignore all but top level navigations.
2120 if (frame->parent()) 2120 if (frame->parent())
2121 return; 2121 return;
2122 2122
2123 std::string title_suffix =
2124 GetVisibilityState() == WebKit::WebPageVisibilityStatePrerender ?
2125 " (Prerender)" : "";
2123 base::debug::TraceLog::GetInstance()->UpdateProcessLabel( 2126 base::debug::TraceLog::GetInstance()->UpdateProcessLabel(
2124 routing_id_, UTF16ToUTF8(title)); 2127 routing_id_, UTF16ToUTF8(title) + title_suffix);
2125 2128
2126 string16 shortened_title = title.substr(0, kMaxTitleChars); 2129 string16 shortened_title = title.substr(0, kMaxTitleChars);
2127 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title, 2130 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title,
2128 title_direction)); 2131 title_direction));
2129 } 2132 }
2130 2133
2131 void RenderViewImpl::UpdateEncoding(WebFrame* frame, 2134 void RenderViewImpl::UpdateEncoding(WebFrame* frame,
2132 const std::string& encoding_name) { 2135 const std::string& encoding_name) {
2133 // Only update main frame's encoding_name. 2136 // Only update main frame's encoding_name.
2134 if (webview()->mainFrame() == frame && 2137 if (webview()->mainFrame() == frame &&
(...skipping 4403 matching lines...) Expand 10 before | Expand all | Expand 10 after
6538 for (size_t i = 0; i < icon_urls.size(); i++) { 6541 for (size_t i = 0; i < icon_urls.size(); i++) {
6539 WebURL url = icon_urls[i].iconURL(); 6542 WebURL url = icon_urls[i].iconURL();
6540 if (!url.isEmpty()) 6543 if (!url.isEmpty())
6541 urls.push_back(FaviconURL(url, 6544 urls.push_back(FaviconURL(url,
6542 ToFaviconType(icon_urls[i].iconType()))); 6545 ToFaviconType(icon_urls[i].iconType())));
6543 } 6546 }
6544 SendUpdateFaviconURL(urls); 6547 SendUpdateFaviconURL(urls);
6545 } 6548 }
6546 6549
6547 } // namespace content 6550 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/trace_subscriber.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698