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

Side by Side Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 910693004: Changing input type from the char key to the key down for allowing background tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 465
466 void FrameLoaderClientImpl::dispatchDidChangeThemeColor() 466 void FrameLoaderClientImpl::dispatchDidChangeThemeColor()
467 { 467 {
468 if (m_webFrame->client()) 468 if (m_webFrame->client())
469 m_webFrame->client()->didChangeThemeColor(); 469 m_webFrame->client()->didChangeThemeColor();
470 } 470 }
471 471
472 static bool allowCreatingBackgroundTabs() 472 static bool allowCreatingBackgroundTabs()
473 { 473 {
474 const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent(); 474 const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent();
475 if (!inputEvent || (inputEvent->type != WebInputEvent::MouseUp && inputEvent ->type != WebInputEvent::Char)) 475 if (!inputEvent || (inputEvent->type != WebInputEvent::MouseUp && (inputEven t->type != WebInputEvent::RawKeyDown && inputEvent->type != WebInputEvent::KeyDo wn)))
476 return false; 476 return false;
477 477
478 unsigned short buttonNumber; 478 unsigned short buttonNumber;
479 if (WebInputEvent::isMouseEventType(inputEvent->type)) { 479 if (WebInputEvent::isMouseEventType(inputEvent->type)) {
480 const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inpu tEvent); 480 const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inpu tEvent);
481 481
482 switch (mouseEvent->button) { 482 switch (mouseEvent->button) {
483 case WebMouseEvent::ButtonLeft: 483 case WebMouseEvent::ButtonLeft:
484 buttonNumber = 0; 484 buttonNumber = 0;
485 break; 485 break;
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 937
938 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 938 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
939 { 939 {
940 if (m_webFrame->client()) { 940 if (m_webFrame->client()) {
941 m_webFrame->client()->suddenTerminationDisablerChanged( 941 m_webFrame->client()->suddenTerminationDisablerChanged(
942 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 942 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
943 } 943 }
944 } 944 }
945 945
946 } // namespace blink 946 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698