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

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: Created 7 years, 6 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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 if (is_swapped_out_) 948 if (is_swapped_out_)
949 NavigateToSwappedOutURL(webview()->mainFrame()); 949 NavigateToSwappedOutURL(webview()->mainFrame());
950 } 950 }
951 951
952 RenderViewImpl::~RenderViewImpl() { 952 RenderViewImpl::~RenderViewImpl() {
953 history_page_ids_.clear(); 953 history_page_ids_.clear();
954 954
955 if (decrement_shared_popup_at_destruction_) 955 if (decrement_shared_popup_at_destruction_)
956 shared_popup_counter_->data--; 956 shared_popup_counter_->data--;
957 957
958 base::debug::TraceLog::GetInstance()->SetProcessLabel(
959 reinterpret_cast<int>(this), std::string());
dsinclair 2013/06/20 15:01:47 The render view uses the pointer address as the nu
960
958 // If file chooser is still waiting for answer, dispatch empty answer. 961 // If file chooser is still waiting for answer, dispatch empty answer.
959 while (!file_chooser_completions_.empty()) { 962 while (!file_chooser_completions_.empty()) {
960 if (file_chooser_completions_.front()->completion) { 963 if (file_chooser_completions_.front()->completion) {
961 file_chooser_completions_.front()->completion->didChooseFile( 964 file_chooser_completions_.front()->completion->didChooseFile(
962 WebVector<WebString>()); 965 WebVector<WebString>());
963 } 966 }
964 file_chooser_completions_.pop_front(); 967 file_chooser_completions_.pop_front();
965 } 968 }
966 969
967 #if defined(OS_ANDROID) 970 #if defined(OS_ANDROID)
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 } 1937 }
1935 1938
1936 // Tell the embedding application that the title of the active page has changed 1939 // Tell the embedding application that the title of the active page has changed
1937 void RenderViewImpl::UpdateTitle(WebFrame* frame, 1940 void RenderViewImpl::UpdateTitle(WebFrame* frame,
1938 const string16& title, 1941 const string16& title,
1939 WebTextDirection title_direction) { 1942 WebTextDirection title_direction) {
1940 // Ignore all but top level navigations. 1943 // Ignore all but top level navigations.
1941 if (frame->parent()) 1944 if (frame->parent())
1942 return; 1945 return;
1943 1946
1947 base::debug::TraceLog::GetInstance()->SetProcessLabel(
1948 reinterpret_cast<int>(this), UTF16ToUTF8(title));
1949
1944 string16 shortened_title = title.substr(0, kMaxTitleChars); 1950 string16 shortened_title = title.substr(0, kMaxTitleChars);
1945 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title, 1951 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title,
1946 title_direction)); 1952 title_direction));
1947 } 1953 }
1948 1954
1949 void RenderViewImpl::UpdateEncoding(WebFrame* frame, 1955 void RenderViewImpl::UpdateEncoding(WebFrame* frame,
1950 const std::string& encoding_name) { 1956 const std::string& encoding_name) {
1951 // Only update main frame's encoding_name. 1957 // Only update main frame's encoding_name.
1952 if (webview()->mainFrame() == frame && 1958 if (webview()->mainFrame() == frame &&
1953 last_encoding_name_ != encoding_name) { 1959 last_encoding_name_ != encoding_name) {
(...skipping 4803 matching lines...) Expand 10 before | Expand all | Expand 10 after
6757 WebURL url = icon_urls[i].iconURL(); 6763 WebURL url = icon_urls[i].iconURL();
6758 if (!url.isEmpty()) 6764 if (!url.isEmpty())
6759 urls.push_back(FaviconURL(url, 6765 urls.push_back(FaviconURL(url,
6760 ToFaviconType(icon_urls[i].iconType()))); 6766 ToFaviconType(icon_urls[i].iconType())));
6761 } 6767 }
6762 SendUpdateFaviconURL(urls); 6768 SendUpdateFaviconURL(urls);
6763 } 6769 }
6764 6770
6765 6771
6766 } // namespace content 6772 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698