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

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

Issue 164198: Merge 21961 - The focus would be messedup when reloading a crashed tab, also ... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/tab_contents/tab_contents.cc:r21961
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/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.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 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 } 1764 }
1765 1765
1766 void TabContents::RenderViewReady(RenderViewHost* rvh) { 1766 void TabContents::RenderViewReady(RenderViewHost* rvh) {
1767 if (rvh != render_view_host()) { 1767 if (rvh != render_view_host()) {
1768 // Don't notify the world, since this came from a renderer in the 1768 // Don't notify the world, since this came from a renderer in the
1769 // background. 1769 // background.
1770 return; 1770 return;
1771 } 1771 }
1772 1772
1773 NotifyConnected(); 1773 NotifyConnected();
1774 bool was_crashed = is_crashed();
1774 SetIsCrashed(false); 1775 SetIsCrashed(false);
1776
1777 // Restore the focus to the tab (otherwise the focus will be on the top
1778 // window).
1779 if (was_crashed && !FocusLocationBarByDefault())
1780 Focus();
1775 } 1781 }
1776 1782
1777 void TabContents::RenderViewGone(RenderViewHost* rvh) { 1783 void TabContents::RenderViewGone(RenderViewHost* rvh) {
1778 // Ask the print preview if this renderer was valuable. 1784 // Ask the print preview if this renderer was valuable.
1779 if (!printing_.OnRenderViewGone(rvh)) 1785 if (!printing_.OnRenderViewGone(rvh))
1780 return; 1786 return;
1781 if (rvh != render_view_host()) { 1787 if (rvh != render_view_host()) {
1782 // The pending page's RenderViewHost is gone. 1788 // The pending page's RenderViewHost is gone.
1783 return; 1789 return;
1784 } 1790 }
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 NavigationController::LoadCommittedDetails& committed_details = 2369 NavigationController::LoadCommittedDetails& committed_details =
2364 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2370 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2365 ExpireInfoBars(committed_details); 2371 ExpireInfoBars(committed_details);
2366 break; 2372 break;
2367 } 2373 }
2368 2374
2369 default: 2375 default:
2370 NOTREACHED(); 2376 NOTREACHED();
2371 } 2377 }
2372 } 2378 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/views/tab_contents/tab_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698