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

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

Issue 155548: Merge 20436 - Fix a crash that happens if a tab is closed while... (Closed) Base URL: svn://chrome-svn/chrome/branches/193/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « base/base_drag_source.cc ('k') | chrome/browser/tab_contents/tab_contents_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/tab_contents/tab_contents.cc:r20436
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 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 } 1876 }
1877 } 1877 }
1878 } 1878 }
1879 1879
1880 void TabContents::UpdateInspectorSettings(const std::wstring& raw_settings) { 1880 void TabContents::UpdateInspectorSettings(const std::wstring& raw_settings) {
1881 profile()->GetPrefs()->SetString(prefs::kWebKitInspectorSettings, 1881 profile()->GetPrefs()->SetString(prefs::kWebKitInspectorSettings,
1882 raw_settings); 1882 raw_settings);
1883 } 1883 }
1884 1884
1885 void TabContents::Close(RenderViewHost* rvh) { 1885 void TabContents::Close(RenderViewHost* rvh) {
1886 // If we close the tab while we're in the middle of a drag, we'll crash.
1887 // Instead, cancel the drag and close it as soon as the drag ends.
1888 if (view()->IsDoingDrag()) {
1889 view()->CancelDragAndCloseTab();
1890 return;
1891 }
1892
1886 // Ignore this if it comes from a RenderViewHost that we aren't showing. 1893 // Ignore this if it comes from a RenderViewHost that we aren't showing.
1887 if (delegate() && rvh == render_view_host()) 1894 if (delegate() && rvh == render_view_host())
1888 delegate()->CloseContents(this); 1895 delegate()->CloseContents(this);
1889 } 1896 }
1890 1897
1891 void TabContents::RequestMove(const gfx::Rect& new_bounds) { 1898 void TabContents::RequestMove(const gfx::Rect& new_bounds) {
1892 if (delegate() && delegate()->IsPopup(this)) 1899 if (delegate() && delegate()->IsPopup(this))
1893 delegate()->MoveContents(this, new_bounds); 1900 delegate()->MoveContents(this, new_bounds);
1894 } 1901 }
1895 1902
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 NavigationController::LoadCommittedDetails& committed_details = 2357 NavigationController::LoadCommittedDetails& committed_details =
2351 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2358 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2352 ExpireInfoBars(committed_details); 2359 ExpireInfoBars(committed_details);
2353 break; 2360 break;
2354 } 2361 }
2355 2362
2356 default: 2363 default:
2357 NOTREACHED(); 2364 NOTREACHED();
2358 } 2365 }
2359 } 2366 }
OLDNEW
« no previous file with comments | « base/base_drag_source.cc ('k') | chrome/browser/tab_contents/tab_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698