Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 STATIC_ASSERT_MATCHING_ENUM(DragOperationCopy); | 226 STATIC_ASSERT_MATCHING_ENUM(DragOperationCopy); |
| 227 STATIC_ASSERT_MATCHING_ENUM(DragOperationLink); | 227 STATIC_ASSERT_MATCHING_ENUM(DragOperationLink); |
| 228 STATIC_ASSERT_MATCHING_ENUM(DragOperationGeneric); | 228 STATIC_ASSERT_MATCHING_ENUM(DragOperationGeneric); |
| 229 STATIC_ASSERT_MATCHING_ENUM(DragOperationPrivate); | 229 STATIC_ASSERT_MATCHING_ENUM(DragOperationPrivate); |
| 230 STATIC_ASSERT_MATCHING_ENUM(DragOperationMove); | 230 STATIC_ASSERT_MATCHING_ENUM(DragOperationMove); |
| 231 STATIC_ASSERT_MATCHING_ENUM(DragOperationDelete); | 231 STATIC_ASSERT_MATCHING_ENUM(DragOperationDelete); |
| 232 STATIC_ASSERT_MATCHING_ENUM(DragOperationEvery); | 232 STATIC_ASSERT_MATCHING_ENUM(DragOperationEvery); |
| 233 | 233 |
| 234 static bool shouldUseExternalPopupMenus = false; | 234 static bool shouldUseExternalPopupMenus = false; |
| 235 | 235 |
| 236 static int webInputEventKeyStateToPlatformEventKeyState(int webInputEventKeyStat e) | 236 static int webInputEventKeyStateToPlatformEventKeyState(int webInputEventKeyStat e) |
|
Rick Byers
2015/02/04 11:42:34
This function is redundant with WebInputEventConve
zino
2015/02/06 07:00:40
Done.
| |
| 237 { | 237 { |
| 238 int platformEventKeyState = 0; | 238 int platformEventKeyState = 0; |
| 239 if (webInputEventKeyState & WebInputEvent::ShiftKey) | 239 if (webInputEventKeyState & WebInputEvent::ShiftKey) |
| 240 platformEventKeyState = platformEventKeyState | PlatformEvent::ShiftKey; | 240 platformEventKeyState = platformEventKeyState | PlatformEvent::ShiftKey; |
| 241 if (webInputEventKeyState & WebInputEvent::ControlKey) | 241 if (webInputEventKeyState & WebInputEvent::ControlKey) |
| 242 platformEventKeyState = platformEventKeyState | PlatformEvent::CtrlKey; | 242 platformEventKeyState = platformEventKeyState | PlatformEvent::CtrlKey; |
| 243 if (webInputEventKeyState & WebInputEvent::AltKey) | 243 if (webInputEventKeyState & WebInputEvent::AltKey) |
| 244 platformEventKeyState = platformEventKeyState | PlatformEvent::AltKey; | 244 platformEventKeyState = platformEventKeyState | PlatformEvent::AltKey; |
| 245 if (webInputEventKeyState & WebInputEvent::MetaKey) | 245 if (webInputEventKeyState & WebInputEvent::MetaKey) |
| 246 platformEventKeyState = platformEventKeyState | PlatformEvent::MetaKey; | 246 platformEventKeyState = platformEventKeyState | PlatformEvent::MetaKey; |
| 247 if (webInputEventKeyState & WebInputEvent::LeftButtonDown) | |
| 248 platformEventKeyState = platformEventKeyState | PlatformEvent::LeftButto nDown; | |
| 249 if (webInputEventKeyState & WebInputEvent::MiddleButtonDown) | |
| 250 platformEventKeyState = platformEventKeyState | PlatformEvent::MiddleBut tonDown; | |
| 251 if (webInputEventKeyState & WebInputEvent::RightButtonDown) | |
| 252 platformEventKeyState = platformEventKeyState | PlatformEvent::RightButt onDown; | |
| 247 return platformEventKeyState; | 253 return platformEventKeyState; |
| 248 } | 254 } |
| 249 | 255 |
| 250 namespace { | 256 namespace { |
| 251 | 257 |
| 252 class UserGestureNotifier { | 258 class UserGestureNotifier { |
| 253 public: | 259 public: |
| 254 // If a UserGestureIndicator is created for a user gesture since the last | 260 // If a UserGestureIndicator is created for a user gesture since the last |
| 255 // page load and *userGestureObserved is false, the UserGestureNotifier | 261 // page load and *userGestureObserved is false, the UserGestureNotifier |
| 256 // will notify the client and set *userGestureObserved to true. | 262 // will notify the client and set *userGestureObserved to true. |
| (...skipping 4349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4606 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4612 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4607 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4613 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
| 4608 } | 4614 } |
| 4609 | 4615 |
| 4610 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4616 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4611 { | 4617 { |
| 4612 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4618 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4613 } | 4619 } |
| 4614 | 4620 |
| 4615 } // namespace blink | 4621 } // namespace blink |
| OLD | NEW |