1 // Copyright (c) 2012 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 #include "content/shell/shell_application_mac.h"
7 #include "base/auto_reset.h"
8 #include "content/shell/shell.h"
9 #include "content/shell/shell_browser_context.h"
10 #include "content/shell/shell_content_browser_client.h"
11 #include "googleurl/src/gurl.h"
13 @implementation ShellCrApplication
15 - (BOOL)isHandlingSendEvent {
16 return handlingSendEvent_;
19 - (void)sendEvent:(NSEvent*)event {
20 base::AutoReset<BOOL> scoper(&handlingSendEvent_, YES);
21 [super sendEvent:event];
24 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
25 handlingSendEvent_ = handlingSendEvent;
28 - (IBAction)newDocument:(id)sender {
29 content::ShellBrowserContext* browserContext =
30 content::ShellContentBrowserClient::Get()->browser_context();
31 content::Shell::CreateNewWindow(browserContext,