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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm

Issue 543663002: Componentize sad_tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 #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 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h" 9 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 11
12 namespace sad_tab {
13
14 SadTab* SadTab::Create(content::WebContents* web_contents,
blundell 2014/09/05 09:08:53 Rather than having a static function declared in t
hashimoto 2014/09/08 12:14:49 Done.
15 SadTabKind kind,
16 SadTabClient* client) {
17 return new chrome::SadTabCocoa(web_contents);
18 }
19
20 } // namespace sad_tab
21
12 namespace chrome { 22 namespace chrome {
13 23
14 SadTab* SadTab::Create(content::WebContents* web_contents, SadTabKind kind) {
15 return new SadTabCocoa(web_contents);
16 }
17
18 SadTabCocoa::SadTabCocoa(content::WebContents* web_contents) 24 SadTabCocoa::SadTabCocoa(content::WebContents* web_contents)
19 : web_contents_(web_contents) { 25 : web_contents_(web_contents) {
20 } 26 }
21 27
22 SadTabCocoa::~SadTabCocoa() { 28 SadTabCocoa::~SadTabCocoa() {
23 } 29 }
24 30
25 void SadTabCocoa::Show() { 31 void SadTabCocoa::Show() {
26 sad_tab_controller_.reset( 32 sad_tab_controller_.reset(
27 [[SadTabController alloc] initWithWebContents:web_contents_]); 33 [[SadTabController alloc] initWithWebContents:web_contents_]);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 - (content::WebContents*)webContents { 69 - (content::WebContents*)webContents {
64 return webContents_; 70 return webContents_;
65 } 71 }
66 72
67 - (void)openLearnMoreAboutCrashLink:(id)sender { 73 - (void)openLearnMoreAboutCrashLink:(id)sender {
68 // Send the action up through the responder chain. 74 // Send the action up through the responder chain.
69 [NSApp sendAction:@selector(openLearnMoreAboutCrashLink:) to:nil from:self]; 75 [NSApp sendAction:@selector(openLearnMoreAboutCrashLink:) to:nil from:self];
70 } 76 }
71 77
72 @end 78 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698