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

Side by Side Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 { 275 {
276 if (!inputEvent) 276 if (!inputEvent)
277 return; 277 return;
278 278
279 unsigned short buttonNumber = 0; 279 unsigned short buttonNumber = 0;
280 if (inputEvent->type == WebInputEvent::MouseUp) { 280 if (inputEvent->type == WebInputEvent::MouseUp) {
281 281
282 const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inpu tEvent); 282 const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inpu tEvent);
283 283
284 switch (mouseEvent->button) { 284 switch (mouseEvent->button) {
285 case WebMouseEvent::ButtonLeft: 285 case WebMouseEvent::Button::Left:
286 buttonNumber = 0; 286 buttonNumber = 0;
287 break; 287 break;
288 case WebMouseEvent::ButtonMiddle: 288 case WebMouseEvent::Button::Middle:
289 buttonNumber = 1; 289 buttonNumber = 1;
290 break; 290 break;
291 case WebMouseEvent::ButtonRight: 291 case WebMouseEvent::Button::Right:
292 buttonNumber = 2; 292 buttonNumber = 2;
293 break; 293 break;
294 default: 294 default:
295 return; 295 return;
296 } 296 }
297 } else if ((WebInputEvent::isKeyboardEventType(inputEvent->type) && static_c ast<const WebKeyboardEvent*>(inputEvent)->windowsKeyCode == VKEY_RETURN) || WebI nputEvent::isGestureEventType(inputEvent->type)) { 297 } else if ((WebInputEvent::isKeyboardEventType(inputEvent->type) && static_c ast<const WebKeyboardEvent*>(inputEvent)->windowsKeyCode == VKEY_RETURN) || WebI nputEvent::isGestureEventType(inputEvent->type)) {
298 // Keyboard and gesture events can simulate mouse events. 298 // Keyboard and gesture events can simulate mouse events.
299 buttonNumber = 0; 299 buttonNumber = 0;
300 } else { 300 } else {
301 return; 301 return;
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 { 1093 {
1094 return wrapUnique(m_webView->scheduler()->createFrameScheduler(blameContext) .release()); 1094 return wrapUnique(m_webView->scheduler()->createFrameScheduler(blameContext) .release());
1095 } 1095 }
1096 1096
1097 double ChromeClientImpl::lastFrameTimeMonotonic() const 1097 double ChromeClientImpl::lastFrameTimeMonotonic() const
1098 { 1098 {
1099 return m_webView->lastFrameTimeMonotonic(); 1099 return m_webView->lastFrameTimeMonotonic();
1100 } 1100 }
1101 1101
1102 } // namespace blink 1102 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AssertMatchingEnums.cpp ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698