OLD | NEW |
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.h" | 5 #include "content/shell/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #import "base/mac/cocoa_protocols.h" | |
12 #import "base/memory/scoped_nsobject.h" | 11 #import "base/memory/scoped_nsobject.h" |
13 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
14 #include "base/sys_string_conversions.h" | 13 #include "base/sys_string_conversions.h" |
15 #include "content/public/browser/native_web_keyboard_event.h" | 14 #include "content/public/browser/native_web_keyboard_event.h" |
16 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
17 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
18 #include "content/shell/resource.h" | 17 #include "content/shell/resource.h" |
19 #include "content/shell/shell_switches.h" | 18 #include "content/shell/shell_switches.h" |
20 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
21 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" | 20 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 if (event.skip_in_browser) | 280 if (event.skip_in_browser) |
282 return; | 281 return; |
283 | 282 |
284 // The event handling to get this strictly right is a tangle; cheat here a bit | 283 // The event handling to get this strictly right is a tangle; cheat here a bit |
285 // by just letting the menus have a chance at it. | 284 // by just letting the menus have a chance at it. |
286 if ([event.os_event type] == NSKeyDown) | 285 if ([event.os_event type] == NSKeyDown) |
287 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; | 286 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; |
288 } | 287 } |
289 | 288 |
290 } // namespace content | 289 } // namespace content |
OLD | NEW |