blob: a8108049faf29974443aea5c9caf299bd311665a [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"
[email protected]3560b572012-04-04 20:47:3210#include "content/shell/shell_content_browser_client.h"
[email protected]f3474bb52012-04-02 16:32:3611#include "googleurl/src/gurl.h"
[email protected]a6708072012-03-27 14:10:4512
[email protected]c4e78d72012-03-24 22:55:4113@implementation ShellCrApplication
14
15- (BOOL)isHandlingSendEvent {
16 return handlingSendEvent_;
17}
18
19- (void)sendEvent:(NSEvent*)event {
[email protected]997ec9f2012-11-21 04:44:1420 base::AutoReset<BOOL> scoper(&handlingSendEvent_, YES);
[email protected]c4e78d72012-03-24 22:55:4121 [super sendEvent:event];
[email protected]c4e78d72012-03-24 22:55:4122}
23
24- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
25 handlingSendEvent_ = handlingSendEvent;
26}
27
[email protected]f3474bb52012-04-02 16:32:3628- (IBAction)newDocument:(id)sender {
[email protected]3560b572012-04-04 20:47:3229 content::ShellBrowserContext* browserContext =
[email protected]eabbfb12013-04-05 23:28:3530 content::ShellContentBrowserClient::Get()->browser_context();
[email protected]3560b572012-04-04 20:47:3231 content::Shell::CreateNewWindow(browserContext,
[email protected]f3474bb52012-04-02 16:32:3632 GURL("about:blank"),
33 NULL,
34 MSG_ROUTING_NONE,
[email protected]cdb806722013-01-10 14:18:2335 gfx::Size());
[email protected]f3474bb52012-04-02 16:32:3636}
37
[email protected]c4e78d72012-03-24 22:55:4138@end