| OLD | NEW |
| 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 #include "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h" | 5 #include "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
| 8 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" | 8 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" |
| 9 #include "chrome/common/url_constants.h" |
| 9 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| 10 | 11 |
| 12 using content::OpenURLParams; |
| 13 using content::Referrer; |
| 14 |
| 11 namespace chrome { | 15 namespace chrome { |
| 12 | 16 |
| 13 SadTab* SadTab::Create(content::WebContents* web_contents, SadTabKind kind) { | 17 SadTab* SadTab::Create(content::WebContents* web_contents, SadTabKind kind) { |
| 14 return new SadTabCocoa(web_contents); | 18 return new SadTabCocoa(web_contents); |
| 15 } | 19 } |
| 16 | 20 |
| 17 SadTabCocoa::SadTabCocoa(content::WebContents* web_contents) | 21 SadTabCocoa::SadTabCocoa(content::WebContents* web_contents) |
| 18 : web_contents_(web_contents) { | 22 : web_contents_(web_contents) { |
| 19 } | 23 } |
| 20 | 24 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 68 } |
| 65 | 69 |
| 66 - (content::WebContents*)webContents { | 70 - (content::WebContents*)webContents { |
| 67 return webContents_; | 71 return webContents_; |
| 68 } | 72 } |
| 69 | 73 |
| 70 - (IBAction)reloadPage:(id)sender { | 74 - (IBAction)reloadPage:(id)sender { |
| 71 webContents_->GetController().Reload(true); | 75 webContents_->GetController().Reload(true); |
| 72 } | 76 } |
| 73 | 77 |
| 78 - (void)openLearnMoreAboutCrashLink:(id)sender { |
| 79 OpenURLParams params(GURL(chrome::kCrashReasonURL), Referrer(), CURRENT_TAB, |
| 80 ui::PAGE_TRANSITION_LINK, false); |
| 81 webContents_->OpenURL(params); |
| 82 } |
| 83 |
| 74 @end | 84 @end |
| OLD | NEW |