[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / tab_contents / sad_tab_controller.h
blob91fc745c5d191d2def1a684216948cb8fdec96dd
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;
17 namespace chrome {
19 class SadTabCocoa : public SadTab {
20 public:
21 explicit SadTabCocoa(content::WebContents* web_contents);
23 virtual ~SadTabCocoa();
25 private:
26 // Overridden from SadTab:
27 virtual void Show() OVERRIDE;
28 virtual void Close() OVERRIDE;
30 base::scoped_nsobject<SadTabController> sad_tab_controller_;
32 content::WebContents* web_contents_;
34 DISALLOW_COPY_AND_ASSIGN(SadTabCocoa);
37 } // namespace chrome
39 // A controller class that manages the SadTabView (aka "Aw Snap" or crash page).
40 @interface SadTabController : NSViewController {
41 @private
42 content::WebContents* webContents_; // Weak reference.
45 // Designated initializer.
46 - (id)initWithWebContents:(content::WebContents*)webContents;
48 // This action just calls the NSApp sendAction to get it into the standard
49 // Cocoa action processing.
50 - (IBAction)openLearnMoreAboutCrashLink:(id)sender;
52 // Returns a weak reference to the WebContents whose WebContentsView created
53 // this SadTabController.
54 - (content::WebContents*)webContents;
56 @end
58 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_