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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h

Issue 8477042: Move Sad Tab implementation out of the TabContentsViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for jochen and jam Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
index 48a97f689eb495f1c345b3e1b4b1efcc76f3748b..4aa0d32cd0f07e75a1b456942a725ee8479335ad 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
@@ -6,19 +6,24 @@
#define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_
#pragma once
+#include "ui/gfx/native_widget_types.h"
+
+#if defined(__OBJC__)
#import <Cocoa/Cocoa.h>
+#endif // __OBJC__
class TabContents;
+#if defined(__OBJC__)
+
// A controller class that manages the SadTabView (aka "Aw Snap" or crash page).
@interface SadTabController : NSViewController {
@private
TabContents* tabContents_; // Weak reference.
}
-// Designated initializer is initWithTabContents.
-- (id)initWithTabContents:(TabContents*)someTabContents
- superview:(NSView*)superview;
+// Designated initializer.
+- (id)initWithTabContents:(TabContents*)tabContents;
// This action just calls the NSApp sendAction to get it into the standard
// Cocoa action processing.
@@ -30,4 +35,16 @@ class TabContents;
@end
+#else
+
+class SadTabController;
+
+#endif // __OBJC__
+
+// Functions that may be accessed from non-Objective-C C/C++ code.
+namespace sad_tab_controller_mac {
+SadTabController* CreateSadTabController(TabContents* tab_contents);
+gfx::NativeView GetViewOfSadTabController(SadTabController* sad_tab);
+}
+
#endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_CONTROLLER_H_
« no previous file with comments | « chrome/browser/ui/cocoa/hung_renderer_controller.mm ('k') | chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698