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

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

Issue 1010613002: Allow creating background tabs in response to ctrl+tapping events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | « Source/core/loader/FrameLoader.cpp ('k') | 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 470 }
471 471
472 void FrameLoaderClientImpl::dispatchDidChangeThemeColor() 472 void FrameLoaderClientImpl::dispatchDidChangeThemeColor()
473 { 473 {
474 if (m_webFrame->client()) 474 if (m_webFrame->client())
475 m_webFrame->client()->didChangeThemeColor(); 475 m_webFrame->client()->didChangeThemeColor();
476 } 476 }
477 477
478 static bool allowCreatingBackgroundTabs() 478 static bool allowCreatingBackgroundTabs()
479 { 479 {
480
480 const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent(); 481 const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent();
481 if (!inputEvent || (inputEvent->type != WebInputEvent::MouseUp && (inputEven t->type != WebInputEvent::RawKeyDown && inputEvent->type != WebInputEvent::KeyDo wn))) 482 if (!inputEvent || (inputEvent->type != WebInputEvent::MouseUp && (inputEven t->type != WebInputEvent::RawKeyDown && inputEvent->type != WebInputEvent::KeyDo wn)
483 && inputEvent->type != WebInputEvent::GestureTap))
482 return false; 484 return false;
483 485
484 unsigned short buttonNumber; 486 unsigned short buttonNumber;
485 if (WebInputEvent::isMouseEventType(inputEvent->type)) { 487 if (WebInputEvent::isMouseEventType(inputEvent->type)) {
486 const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inpu tEvent); 488 const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inpu tEvent);
487 489
488 switch (mouseEvent->button) { 490 switch (mouseEvent->button) {
489 case WebMouseEvent::ButtonLeft: 491 case WebMouseEvent::ButtonLeft:
490 buttonNumber = 0; 492 buttonNumber = 0;
491 break; 493 break;
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 958
957 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 959 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
958 { 960 {
959 if (m_webFrame->client()) { 961 if (m_webFrame->client()) {
960 m_webFrame->client()->suddenTerminationDisablerChanged( 962 m_webFrame->client()->suddenTerminationDisablerChanged(
961 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 963 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
962 } 964 }
963 } 965 }
964 966
965 } // namespace blink 967 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698