blob: e18df5b67cf389f3c54894794e0f4ddeec4caa12 [file] [log] [blame]
[email protected]de7d61ff2013-08-20 11:30:411// Copyright 2013 The Chromium Authors. All rights reserved.
[email protected]c4e78d72012-03-24 22:55:412// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]de7d61ff2013-08-20 11:30:415#include "content/shell/browser/shell_application_mac.h"
[email protected]c4e78d72012-03-24 22:55:416
[email protected]a6708072012-03-27 14:10:457#include "base/auto_reset.h"
[email protected]685c8af2013-08-06 03:10:158#include "content/public/common/url_constants.h"
[email protected]de7d61ff2013-08-20 11:30:419#include "content/shell/browser/shell.h"
10#include "content/shell/browser/shell_browser_context.h"
11#include "content/shell/browser/shell_content_browser_client.h"
[email protected]707e1c42013-07-09 21:18:5812#include "url/gurl.h"
[email protected]a6708072012-03-27 14:10:4513
[email protected]c4e78d72012-03-24 22:55:4114@implementation ShellCrApplication
15
16- (BOOL)isHandlingSendEvent {
17 return handlingSendEvent_;
18}
19
20- (void)sendEvent:(NSEvent*)event {
[email protected]997ec9f2012-11-21 04:44:1421 base::AutoReset<BOOL> scoper(&handlingSendEvent_, YES);
[email protected]c4e78d72012-03-24 22:55:4122 [super sendEvent:event];
[email protected]c4e78d72012-03-24 22:55:4123}
24
25- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
26 handlingSendEvent_ = handlingSendEvent;
27}
28
[email protected]f3474bb52012-04-02 16:32:3629- (IBAction)newDocument:(id)sender {
[email protected]3560b572012-04-04 20:47:3230 content::ShellBrowserContext* browserContext =
[email protected]eabbfb12013-04-05 23:28:3531 content::ShellContentBrowserClient::Get()->browser_context();
[email protected]3560b572012-04-04 20:47:3232 content::Shell::CreateNewWindow(browserContext,
[email protected]685c8af2013-08-06 03:10:1533 GURL(content::kAboutBlankURL),
[email protected]f3474bb52012-04-02 16:32:3634 NULL,
35 MSG_ROUTING_NONE,
[email protected]cdb806722013-01-10 14:18:2336 gfx::Size());
[email protected]f3474bb52012-04-02 16:32:3637}
38
[email protected]c4e78d72012-03-24 22:55:4139@end