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" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 void Shell::URLEntered(std::string url_string) { | 270 void Shell::URLEntered(std::string url_string) { |
271 if (!url_string.empty()) { | 271 if (!url_string.empty()) { |
272 GURL url(url_string); | 272 GURL url(url_string); |
273 if (!url.has_scheme()) | 273 if (!url.has_scheme()) |
274 url = GURL("http://" + url_string); | 274 url = GURL("http://" + url_string); |
275 LoadURL(url); | 275 LoadURL(url); |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 void Shell::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 279 void Shell::HandleKeyboardEvent(WebContents* source, |
| 280 const NativeWebKeyboardEvent& event) { |
280 if (event.skip_in_browser) | 281 if (event.skip_in_browser) |
281 return; | 282 return; |
282 | 283 |
283 // The event handling to get this strictly right is a tangle; cheat here a bit | 284 // The event handling to get this strictly right is a tangle; cheat here a bit |
284 // by just letting the menus have a chance at it. | 285 // by just letting the menus have a chance at it. |
285 if ([event.os_event type] == NSKeyDown) | 286 if ([event.os_event type] == NSKeyDown) |
286 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; | 287 [[NSApp mainMenu] performKeyEquivalent:event.os_event]; |
287 } | 288 } |
288 | 289 |
289 } // namespace content | 290 } // namespace content |
OLD | NEW |