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

Unified Diff: content/shell/shell_mac.mm

Issue 10823263: Add Debug menu to Mac Content Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/shell_mac.mm
diff --git a/content/shell/shell_mac.mm b/content/shell/shell_mac.mm
index fba3c0b6db165c189c589675f10c4cd512244eb4..5edc873dcf48b6b05481a706e3b53aecc717f519 100644
--- a/content/shell/shell_mac.mm
+++ b/content/shell/shell_mac.mm
@@ -83,6 +83,26 @@ enum {
@end
+@interface CrShellWindow : UnderlayOpenGLHostingWindow {
+ @private
+ content::Shell* shell_;
+}
+- (void)setShell:(content::Shell*)shell;
+- (void)showDevTools:(id)sender;
+@end
+
+@implementation CrShellWindow
+
+- (void)setShell:(content::Shell*)shell {
+ shell_ = shell;
+}
+
+- (void)showDevTools:(id)sender {
+ shell_->ShowDevTools();
+}
+
+@end
+
namespace {
NSString* kWindowTitle = @"Content Shell";
@@ -168,11 +188,13 @@ void Shell::PlatformCreateWindow(int width, int height) {
content_rect = NSOffsetRect(initial_window_bounds, -10000, -10000);
style_mask = NSBorderlessWindowMask;
}
- window_ = [[UnderlayOpenGLHostingWindow alloc]
- initWithContentRect:content_rect
- styleMask:style_mask
- backing:NSBackingStoreBuffered
- defer:NO];
+ CrShellWindow* window =
+ [[CrShellWindow alloc] initWithContentRect:content_rect
+ styleMask:style_mask
+ backing:NSBackingStoreBuffered
+ defer:NO];
+ window_ = window;
+ [window setShell:this];
[window_ setTitle:kWindowTitle];
NSView* content = [window_ contentView];
« content/shell/mac/English.lproj/MainMenu.xib ('K') | « content/shell/shell_browser_main_parts.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698