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

Side by Side Diff: content/shell/shell_application_mac.mm

Issue 9965064: Mac content shell: File > New makes a new browser window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_application_mac.h ('k') | content/shell/shell_browser_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_application_mac.h" 5 #include "content/shell/shell_application_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "content/shell/shell.h"
9 #include "content/shell/shell_browser_context.h"
10 #include "googleurl/src/gurl.h"
8 11
9 @implementation ShellCrApplication 12 @implementation ShellCrApplication
10 13
11 - (BOOL)isHandlingSendEvent { 14 - (BOOL)isHandlingSendEvent {
12 return handlingSendEvent_; 15 return handlingSendEvent_;
13 } 16 }
14 17
15 - (void)sendEvent:(NSEvent*)event { 18 - (void)sendEvent:(NSEvent*)event {
16 AutoReset<BOOL> scoper(&handlingSendEvent_, YES); 19 AutoReset<BOOL> scoper(&handlingSendEvent_, YES);
17 [super sendEvent:event]; 20 [super sendEvent:event];
18 } 21 }
19 22
20 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 23 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
21 handlingSendEvent_ = handlingSendEvent; 24 handlingSendEvent_ = handlingSendEvent;
22 } 25 }
23 26
27 - (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
24 @end 35 @end
OLDNEW
« no previous file with comments | « content/shell/shell_application_mac.h ('k') | content/shell/shell_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698