OLD | NEW |
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 Loading... |
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(routing_id_); |
| 972 |
971 // If file chooser is still waiting for answer, dispatch empty answer. | 973 // If file chooser is still waiting for answer, dispatch empty answer. |
972 while (!file_chooser_completions_.empty()) { | 974 while (!file_chooser_completions_.empty()) { |
973 if (file_chooser_completions_.front()->completion) { | 975 if (file_chooser_completions_.front()->completion) { |
974 file_chooser_completions_.front()->completion->didChooseFile( | 976 file_chooser_completions_.front()->completion->didChooseFile( |
975 WebVector<WebString>()); | 977 WebVector<WebString>()); |
976 } | 978 } |
977 file_chooser_completions_.pop_front(); | 979 file_chooser_completions_.pop_front(); |
978 } | 980 } |
979 | 981 |
980 #if defined(OS_ANDROID) | 982 #if defined(OS_ANDROID) |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1947 } | 1949 } |
1948 | 1950 |
1949 // Tell the embedding application that the title of the active page has changed | 1951 // Tell the embedding application that the title of the active page has changed |
1950 void RenderViewImpl::UpdateTitle(WebFrame* frame, | 1952 void RenderViewImpl::UpdateTitle(WebFrame* frame, |
1951 const string16& title, | 1953 const string16& title, |
1952 WebTextDirection title_direction) { | 1954 WebTextDirection title_direction) { |
1953 // Ignore all but top level navigations. | 1955 // Ignore all but top level navigations. |
1954 if (frame->parent()) | 1956 if (frame->parent()) |
1955 return; | 1957 return; |
1956 | 1958 |
| 1959 base::debug::TraceLog::GetInstance()->UpdateProcessLabel( |
| 1960 routing_id_, UTF16ToUTF8(title)); |
| 1961 |
1957 string16 shortened_title = title.substr(0, kMaxTitleChars); | 1962 string16 shortened_title = title.substr(0, kMaxTitleChars); |
1958 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title, | 1963 Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title, |
1959 title_direction)); | 1964 title_direction)); |
1960 } | 1965 } |
1961 | 1966 |
1962 void RenderViewImpl::UpdateEncoding(WebFrame* frame, | 1967 void RenderViewImpl::UpdateEncoding(WebFrame* frame, |
1963 const std::string& encoding_name) { | 1968 const std::string& encoding_name) { |
1964 // Only update main frame's encoding_name. | 1969 // Only update main frame's encoding_name. |
1965 if (webview()->mainFrame() == frame && | 1970 if (webview()->mainFrame() == frame && |
1966 last_encoding_name_ != encoding_name) { | 1971 last_encoding_name_ != encoding_name) { |
(...skipping 4817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6784 WebURL url = icon_urls[i].iconURL(); | 6789 WebURL url = icon_urls[i].iconURL(); |
6785 if (!url.isEmpty()) | 6790 if (!url.isEmpty()) |
6786 urls.push_back(FaviconURL(url, | 6791 urls.push_back(FaviconURL(url, |
6787 ToFaviconType(icon_urls[i].iconType()))); | 6792 ToFaviconType(icon_urls[i].iconType()))); |
6788 } | 6793 } |
6789 SendUpdateFaviconURL(urls); | 6794 SendUpdateFaviconURL(urls); |
6790 } | 6795 } |
6791 | 6796 |
6792 | 6797 |
6793 } // namespace content | 6798 } // namespace content |
OLD | NEW |