blob: 3afb7a6724822b2c8ca1a21ca7eb59b84c252065 [file] [log] [blame]
[email protected]c4e78d72012-03-24 22:55:411// 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.
4
5#include "content/shell/shell_application_mac.h"
6
[email protected]a6708072012-03-27 14:10:457#include "base/auto_reset.h"
[email protected]f3474bb52012-04-02 16:32:368#include "content/shell/shell.h"
9#include "content/shell/shell_browser_context.h"
10#include "googleurl/src/gurl.h"
[email protected]a6708072012-03-27 14:10:4511
[email protected]c4e78d72012-03-24 22:55:4112@implementation ShellCrApplication
13
14- (BOOL)isHandlingSendEvent {
15 return handlingSendEvent_;
16}
17
18- (void)sendEvent:(NSEvent*)event {
[email protected]a6708072012-03-27 14:10:4519 AutoReset<BOOL> scoper(&handlingSendEvent_, YES);
[email protected]c4e78d72012-03-24 22:55:4120 [super sendEvent:event];
[email protected]c4e78d72012-03-24 22:55:4121}
22
23- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
24 handlingSendEvent_ = handlingSendEvent;
25}
26
[email protected]f3474bb52012-04-02 16:32:3627- (IBAction)newDocument:(id)sender {
28 content::Shell::CreateNewWindow(content::ShellBrowserContext::GetInstance(),
29 GURL("about:blank"),
30 NULL,
31 MSG_ROUTING_NONE,
32 NULL);
33}
34
[email protected]c4e78d72012-03-24 22:55:4135@end