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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 8477042: Move Sad Tab implementation out of the TabContentsViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for jochen and jam Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 // with find results. The position changes whenever the window is resized, 1739 // with find results. The position changes whenever the window is resized,
1740 // and |layoutSubviews| computes the FindBar's position. 1740 // and |layoutSubviews| computes the FindBar's position.
1741 // TODO: calling |layoutSubviews| here is a waste, find a better way to 1741 // TODO: calling |layoutSubviews| here is a waste, find a better way to
1742 // do this. 1742 // do this.
1743 if ([findBarCocoaController_ isFindBarVisible]) 1743 if ([findBarCocoaController_ isFindBarVisible])
1744 [self layoutSubviews]; 1744 [self layoutSubviews];
1745 } 1745 }
1746 1746
1747 // Handle the openLearnMoreAboutCrashLink: action from SadTabController when 1747 // Handle the openLearnMoreAboutCrashLink: action from SadTabController when
1748 // "Learn more" link in "Aw snap" page (i.e. crash page or sad tab) is 1748 // "Learn more" link in "Aw snap" page (i.e. crash page or sad tab) is
1749 // clicked. Decoupling the action from its target makes unitestting possible. 1749 // clicked. Decoupling the action from its target makes unit testing possible.
1750 - (void)openLearnMoreAboutCrashLink:(id)sender { 1750 - (void)openLearnMoreAboutCrashLink:(id)sender {
1751 if ([sender isKindOfClass:[SadTabController class]]) { 1751 if ([sender isKindOfClass:[SadTabController class]]) {
1752 SadTabController* sad_tab = static_cast<SadTabController*>(sender); 1752 SadTabController* sad_tab = static_cast<SadTabController*>(sender);
1753 TabContents* tab_contents = [sad_tab tabContents]; 1753 TabContents* tab_contents = [sad_tab tabContents];
1754 if (tab_contents) { 1754 if (tab_contents) {
1755 GURL helpUrl = 1755 GURL helpUrl =
1756 google_util::AppendGoogleLocaleParam(GURL(chrome::kCrashReasonURL)); 1756 google_util::AppendGoogleLocaleParam(GURL(chrome::kCrashReasonURL));
1757 tab_contents->OpenURL( 1757 tab_contents->OpenURL(
1758 helpUrl, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_LINK); 1758 helpUrl, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_LINK);
1759 } 1759 }
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2177
2178 - (BOOL)supportsBookmarkBar { 2178 - (BOOL)supportsBookmarkBar {
2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2179 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2180 } 2180 }
2181 2181
2182 - (BOOL)isTabbedWindow { 2182 - (BOOL)isTabbedWindow {
2183 return browser_->is_type_tabbed(); 2183 return browser_->is_type_tabbed();
2184 } 2184 }
2185 2185
2186 @end // @implementation BrowserWindowController(WindowType) 2186 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | chrome/browser/ui/cocoa/hung_renderer_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698