Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / tab_contents / sad_tab_controller.h
blob45655b52286a5d7f67208643300dd8b9f7e84543
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/ui/sad_tab.h"
13 #import <Cocoa/Cocoa.h>
15 @class SadTabController;
16 @class SadTabView;
18 namespace chrome {
20 class SadTabCocoa : public SadTab {
21 public:
22 explicit SadTabCocoa(content::WebContents* web_contents);
24 ~SadTabCocoa() override;
26 private:
27 // Overridden from SadTab:
28 void Show() override;
29 void Close() override;
31 base::scoped_nsobject<SadTabController> sad_tab_controller_;
33 content::WebContents* web_contents_;
35 DISALLOW_COPY_AND_ASSIGN(SadTabCocoa);
38 } // namespace chrome
40 // A controller class that manages the SadTabView (aka "Aw Snap" or crash page).
41 @interface SadTabController : NSViewController {
42 @private
43 content::WebContents* webContents_; // Weak reference.
44 base::scoped_nsobject<SadTabView> sadTabView_;
47 // Designated initializer.
48 - (id)initWithWebContents:(content::WebContents*)webContents;
50 // Returns a weak reference to the WebContents whose WebContentsView created
51 // this SadTabController.
52 - (content::WebContents*)webContents;
54 @end
56 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_