OLD | NEW |
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/browser/web_contents.h" | 5 #include "chrome/browser/web_contents.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 if (plugin_installer_ != NULL) | 859 if (plugin_installer_ != NULL) |
860 plugin_installer_->OnStartLoading(); | 860 plugin_installer_->OnStartLoading(); |
861 SetIsLoading(true, NULL); | 861 SetIsLoading(true, NULL); |
862 } | 862 } |
863 | 863 |
864 void WebContents::DidStopLoading(RenderViewHost* rvh, int32 page_id) { | 864 void WebContents::DidStopLoading(RenderViewHost* rvh, int32 page_id) { |
865 scoped_ptr<LoadNotificationDetails> details; | 865 scoped_ptr<LoadNotificationDetails> details; |
866 if (controller()) { | 866 if (controller()) { |
867 NavigationEntry* entry = controller()->GetActiveEntry(); | 867 NavigationEntry* entry = controller()->GetActiveEntry(); |
868 if (entry) { | 868 if (entry) { |
869 scoped_ptr<process_util::ProcessMetrics> metrics( | 869 scoped_ptr<base::ProcessMetrics> metrics( |
870 process_util::ProcessMetrics::CreateProcessMetrics( | 870 base::ProcessMetrics::CreateProcessMetrics( |
871 process()->process().handle())); | 871 process()->process().handle())); |
872 | 872 |
873 TimeDelta elapsed = TimeTicks::Now() - current_load_start_; | 873 TimeDelta elapsed = TimeTicks::Now() - current_load_start_; |
874 | 874 |
875 details.reset(new LoadNotificationDetails( | 875 details.reset(new LoadNotificationDetails( |
876 entry->display_url(), | 876 entry->display_url(), |
877 entry->transition_type(), | 877 entry->transition_type(), |
878 elapsed, | 878 elapsed, |
879 controller(), | 879 controller(), |
880 controller()->GetCurrentEntryIndex())); | 880 controller()->GetCurrentEntryIndex())); |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 // The favicon url isn't valid. This means there really isn't a favicon, | 1834 // The favicon url isn't valid. This means there really isn't a favicon, |
1835 // or the favicon url wasn't obtained before the load started. This assumes | 1835 // or the favicon url wasn't obtained before the load started. This assumes |
1836 // the later. | 1836 // the later. |
1837 // TODO(sky): Need a way to set the favicon that doesn't involve generating | 1837 // TODO(sky): Need a way to set the favicon that doesn't involve generating |
1838 // its url. | 1838 // its url. |
1839 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); | 1839 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); |
1840 } | 1840 } |
1841 new_url->set_safe_for_autoreplace(true); | 1841 new_url->set_safe_for_autoreplace(true); |
1842 url_model->Add(new_url); | 1842 url_model->Add(new_url); |
1843 } | 1843 } |
OLD | NEW |