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

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

Issue 17451017: Process names, and predictable thread and process ordering in about:tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nitfixes Created 7 years, 5 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
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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 if (is_swapped_out_) 961 if (is_swapped_out_)
962 NavigateToSwappedOutURL(webview()->mainFrame()); 962 NavigateToSwappedOutURL(webview()->mainFrame());
963 } 963 }
964 964
965 RenderViewImpl::~RenderViewImpl() { 965 RenderViewImpl::~RenderViewImpl() {
966 history_page_ids_.clear(); 966 history_page_ids_.clear();
967 967
968 if (decrement_shared_popup_at_destruction_) 968 if (decrement_shared_popup_at_destruction_)
969 shared_popup_counter_->data--; 969 shared_popup_counter_->data--;
970 970
971 base::debug::TraceLog::GetInstance()->RemoveProcessLabel(
972 reinterpret_cast<int>(this));
piman 2013/07/03 19:35:55 nit: Is the label id just an arbitrary unique, per
973
971 // If file chooser is still waiting for answer, dispatch empty answer. 974 // If file chooser is still waiting for answer, dispatch empty answer.
972 while (!file_chooser_completions_.empty()) { 975 while (!file_chooser_completions_.empty()) {
973 if (file_chooser_completions_.front()->completion) { 976 if (file_chooser_completions_.front()->completion) {
974 file_chooser_completions_.front()->completion->didChooseFile( 977 file_chooser_completions_.front()->completion->didChooseFile(
975 WebVector<WebString>()); 978 WebVector<WebString>());
976 } 979 }
977 file_chooser_completions_.pop_front(); 980 file_chooser_completions_.pop_front();
978 } 981 }
979 982
980 #if defined(OS_ANDROID) 983 #if defined(OS_ANDROID)
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 } 1950 }
1948 1951
1949 // Tell the embedding application that the title of the active page has changed 1952 // Tell the embedding application that the title of the active page has changed
1950 void RenderViewImpl::UpdateTitle(WebFrame* frame, 1953 void RenderViewImpl::UpdateTitle(WebFrame* frame,
1951 const string16& title, 1954 const string16& title,
1952 WebTextDirection title_direction) { 1955 WebTextDirection title_direction) {
1953 // Ignore all but top level navigations. 1956 // Ignore all but top level navigations.
1954 if (frame->parent()) 1957 if (frame->parent())
1955 return; 1958 return;
1956 1959
1960 base::debug::TraceLog::GetInstance()->UpdateProcessLabel(
1961 reinterpret_cast<int>(this), UTF16ToUTF8(title));
1962
1957 string16 shortened_title = title.substr(0, kMaxTitleChars); 1963 string16 shortened_title = title.substr(0, kMaxTitleChars);
1958 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title, 1964 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title,
1959 title_direction)); 1965 title_direction));
1960 } 1966 }
1961 1967
1962 void RenderViewImpl::UpdateEncoding(WebFrame* frame, 1968 void RenderViewImpl::UpdateEncoding(WebFrame* frame,
1963 const std::string& encoding_name) { 1969 const std::string& encoding_name) {
1964 // Only update main frame's encoding_name. 1970 // Only update main frame's encoding_name.
1965 if (webview()->mainFrame() == frame && 1971 if (webview()->mainFrame() == frame &&
1966 last_encoding_name_ != encoding_name) { 1972 last_encoding_name_ != encoding_name) {
(...skipping 4817 matching lines...) Expand 10 before | Expand all | Expand 10 after
6784 WebURL url = icon_urls[i].iconURL(); 6790 WebURL url = icon_urls[i].iconURL();
6785 if (!url.isEmpty()) 6791 if (!url.isEmpty())
6786 urls.push_back(FaviconURL(url, 6792 urls.push_back(FaviconURL(url,
6787 ToFaviconType(icon_urls[i].iconType()))); 6793 ToFaviconType(icon_urls[i].iconType())));
6788 } 6794 }
6789 SendUpdateFaviconURL(urls); 6795 SendUpdateFaviconURL(urls);
6790 } 6796 }
6791 6797
6792 6798
6793 } // namespace content 6799 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698