OLD | NEW |
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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 m_webFrame->didFinish(); | 457 m_webFrame->didFinish(); |
458 } | 458 } |
459 | 459 |
460 void FrameLoaderClientImpl::dispatchDidChangeThemeColor() { | 460 void FrameLoaderClientImpl::dispatchDidChangeThemeColor() { |
461 if (m_webFrame->client()) | 461 if (m_webFrame->client()) |
462 m_webFrame->client()->didChangeThemeColor(); | 462 m_webFrame->client()->didChangeThemeColor(); |
463 } | 463 } |
464 | 464 |
465 static bool allowCreatingBackgroundTabs() { | 465 static bool allowCreatingBackgroundTabs() { |
466 const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent(); | 466 const WebInputEvent* inputEvent = WebViewImpl::currentInputEvent(); |
467 if (!inputEvent || (inputEvent->type() != WebInputEvent::MouseUp && | 467 if (!inputEvent || |
468 (inputEvent->type() != WebInputEvent::RawKeyDown && | 468 (inputEvent->type() != WebInputEvent::MouseUp && |
469 inputEvent->type() != WebInputEvent::KeyDown) && | 469 (inputEvent->type() != WebInputEvent::RawKeyDown && |
470 inputEvent->type() != WebInputEvent::GestureTap)) | 470 inputEvent->type() != WebInputEvent::KeyDown) && |
| 471 inputEvent->type() != WebInputEvent::GestureTap)) |
471 return false; | 472 return false; |
472 | 473 |
473 unsigned short buttonNumber; | 474 unsigned short buttonNumber; |
474 if (WebInputEvent::isMouseEventType(inputEvent->type())) { | 475 if (WebInputEvent::isMouseEventType(inputEvent->type())) { |
475 const WebMouseEvent* mouseEvent = | 476 const WebMouseEvent* mouseEvent = |
476 static_cast<const WebMouseEvent*>(inputEvent); | 477 static_cast<const WebMouseEvent*>(inputEvent); |
477 | 478 |
478 switch (mouseEvent->button) { | 479 switch (mouseEvent->button) { |
479 case WebMouseEvent::Button::Left: | 480 case WebMouseEvent::Button::Left: |
480 buttonNumber = 0; | 481 buttonNumber = 0; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 1003 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
1003 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1004 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
1004 } | 1005 } |
1005 | 1006 |
1006 void FrameLoaderClientImpl::setHasReceivedUserGesture() { | 1007 void FrameLoaderClientImpl::setHasReceivedUserGesture() { |
1007 if (m_webFrame->client()) | 1008 if (m_webFrame->client()) |
1008 m_webFrame->client()->setHasReceivedUserGesture(); | 1009 m_webFrame->client()->setHasReceivedUserGesture(); |
1009 } | 1010 } |
1010 | 1011 |
1011 } // namespace blink | 1012 } // namespace blink |
OLD | NEW |