| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /* | 5 /* |
| 6 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2006-2009 Google Inc. | 7 * Copyright (C) 2006-2009 Google Inc. |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 // cmd-b and and cmd-i are system wide key bindings that OS X doesn't | 220 // cmd-b and and cmd-i are system wide key bindings that OS X doesn't |
| 221 // handle for us, so the editor handles them. | 221 // handle for us, so the editor handles them. |
| 222 int modifiers = event.modifiers & blink::WebInputEvent::InputModifiers; | 222 int modifiers = event.modifiers & blink::WebInputEvent::InputModifiers; |
| 223 if (modifiers == blink::WebInputEvent::MetaKey && | 223 if (modifiers == blink::WebInputEvent::MetaKey && |
| 224 event.windowsKeyCode == ui::VKEY_B) | 224 event.windowsKeyCode == ui::VKEY_B) |
| 225 return false; | 225 return false; |
| 226 if (modifiers == blink::WebInputEvent::MetaKey && | 226 if (modifiers == blink::WebInputEvent::MetaKey && |
| 227 event.windowsKeyCode == ui::VKEY_I) | 227 event.windowsKeyCode == ui::VKEY_I) |
| 228 return false; | 228 return false; |
| 229 // Add exception for cmd-v for do paste into webpages more quickly. |
| 230 if (modifiers == blink::WebInputEvent::MetaKey && |
| 231 event.windowsKeyCode == ui::VKEY_V) |
| 232 return false; |
| 229 | 233 |
| 230 return event.modifiers & blink::WebInputEvent::MetaKey; | 234 return event.modifiers & blink::WebInputEvent::MetaKey; |
| 231 } | 235 } |
| 232 | 236 |
| 233 blink::WebMouseWheelEvent::Phase PhaseForNSEventPhase( | 237 blink::WebMouseWheelEvent::Phase PhaseForNSEventPhase( |
| 234 NSEventPhase event_phase) { | 238 NSEventPhase event_phase) { |
| 235 uint32_t phase = blink::WebMouseWheelEvent::PhaseNone; | 239 uint32_t phase = blink::WebMouseWheelEvent::PhaseNone; |
| 236 if (event_phase & NSEventPhaseBegan) | 240 if (event_phase & NSEventPhaseBegan) |
| 237 phase |= blink::WebMouseWheelEvent::PhaseBegan; | 241 phase |= blink::WebMouseWheelEvent::PhaseBegan; |
| 238 if (event_phase & NSEventPhaseStationary) | 242 if (event_phase & NSEventPhaseStationary) |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 break; | 611 break; |
| 608 default: | 612 default: |
| 609 NOTIMPLEMENTED(); | 613 NOTIMPLEMENTED(); |
| 610 result.type = blink::WebInputEvent::Undefined; | 614 result.type = blink::WebInputEvent::Undefined; |
| 611 } | 615 } |
| 612 | 616 |
| 613 return result; | 617 return result; |
| 614 } | 618 } |
| 615 | 619 |
| 616 } // namespace content | 620 } // namespace content |
| OLD | NEW |