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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 397031: Launch processes asynchronously so as not to block the UI thread. For now, re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: return 0 instead of -1 if zygote couldn't launch renderer Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 SetIsLoading(true, NULL); 2132 SetIsLoading(true, NULL);
2133 } 2133 }
2134 2134
2135 void TabContents::DidStopLoading() { 2135 void TabContents::DidStopLoading() {
2136 scoped_ptr<LoadNotificationDetails> details; 2136 scoped_ptr<LoadNotificationDetails> details;
2137 2137
2138 NavigationEntry* entry = controller_.GetActiveEntry(); 2138 NavigationEntry* entry = controller_.GetActiveEntry();
2139 // An entry may not exist for a stop when loading an initial blank page or 2139 // An entry may not exist for a stop when loading an initial blank page or
2140 // if an iframe injected by script into a blank page finishes loading. 2140 // if an iframe injected by script into a blank page finishes loading.
2141 if (entry) { 2141 if (entry) {
2142 scoped_ptr<base::ProcessMetrics> metrics(
2143 base::ProcessMetrics::CreateProcessMetrics(process()->GetHandle()));
2144
2145 base::TimeDelta elapsed = base::TimeTicks::Now() - current_load_start_; 2142 base::TimeDelta elapsed = base::TimeTicks::Now() - current_load_start_;
2146 2143
2147 details.reset(new LoadNotificationDetails( 2144 details.reset(new LoadNotificationDetails(
2148 entry->virtual_url(), 2145 entry->virtual_url(),
2149 entry->transition_type(), 2146 entry->transition_type(),
2150 elapsed, 2147 elapsed,
2151 &controller_, 2148 &controller_,
2152 controller_.GetCurrentEntryIndex())); 2149 controller_.GetCurrentEntryIndex()));
2153 } 2150 }
2154 2151
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt); 2629 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt);
2633 } 2630 }
2634 2631
2635 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) { 2632 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) {
2636 set_suppress_javascript_messages(suppress_message_boxes); 2633 set_suppress_javascript_messages(suppress_message_boxes);
2637 } 2634 }
2638 2635
2639 void TabContents::set_encoding(const std::string& encoding) { 2636 void TabContents::set_encoding(const std::string& encoding) {
2640 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 2637 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
2641 } 2638 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_process_host.h ('k') | chrome/browser/visitedlink_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698