Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/native_widget_types.h" | |
| 10 | |
| 11 #if defined(__OBJC__) | |
| 9 #import <Cocoa/Cocoa.h> | 12 #import <Cocoa/Cocoa.h> |
| 13 #endif // __OBJC__ | |
| 10 | 14 |
| 11 class TabContents; | 15 class TabContents; |
| 12 | 16 |
| 17 #if defined(__OBJC__) | |
| 18 | |
| 13 // A controller class that manages the SadTabView (aka "Aw Snap" or crash page). | 19 // A controller class that manages the SadTabView (aka "Aw Snap" or crash page). |
| 14 @interface SadTabController : NSViewController { | 20 @interface SadTabController : NSViewController { |
| 15 @private | 21 @private |
| 16 TabContents* tabContents_; // Weak reference. | 22 TabContents* tabContents_; // Weak reference. |
| 17 } | 23 } |
| 18 | 24 |
| 19 // Designated initializer is initWithTabContents. | 25 // Designated initializer. |
| 20 - (id)initWithTabContents:(TabContents*)someTabContents | 26 - (id)initWithTabContents:(TabContents*)tabContents; |
| 21 superview:(NSView*)superview; | |
| 22 | 27 |
| 23 // This action just calls the NSApp sendAction to get it into the standard | 28 // This action just calls the NSApp sendAction to get it into the standard |
| 24 // Cocoa action processing. | 29 // Cocoa action processing. |
| 25 - (IBAction)openLearnMoreAboutCrashLink:(id)sender; | 30 - (IBAction)openLearnMoreAboutCrashLink:(id)sender; |
| 26 | 31 |
| 27 // Returns a weak reference to the TabContents whose TabContentsView created | 32 // Returns a weak reference to the TabContents whose TabContentsView created |
| 28 // this SadTabController. | 33 // this SadTabController. |
| 29 - (TabContents*)tabContents; | 34 - (TabContents*)tabContents; |
| 30 | 35 |
| 31 @end | 36 @end |
| 32 | 37 |
| 38 #else | |
| 39 | |
| 40 class SadTabController; | |
| 41 | |
| 42 #endif // __OBJC__ | |
| 43 | |
| 44 // Functions that may be accessed from non-Objective-C C/C++ code. | |
| 45 namespace sad_tab_controller_mac { | |
| 46 SadTabController* CreateSadTabController(TabContents* tab_contents); | |
| 47 gfx::NativeView ViewOfSadTabController(SadTabController* sad_tab); | |
|
jochen (gone - plz use gerrit)
2011/11/14 16:44:54
maybe verb+noun would be better? GetViewOfSadTabCo
| |
| 48 } | |
| 49 | |
| 33 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_ | 50 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_ |
| OLD | NEW |