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 3507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3518 { | 3518 { |
| 3519 HitTestResult result = hitTestResultForViewportPos(location); | 3519 HitTestResult result = hitTestResultForViewportPos(location); |
| 3520 RefPtrWillBeRawPtr<Node> node = result.innerNode(); | 3520 RefPtrWillBeRawPtr<Node> node = result.innerNode(); |
| 3521 if (!isHTMLVideoElement(*node) && !isHTMLAudioElement(*node)) | 3521 if (!isHTMLVideoElement(*node) && !isHTMLAudioElement(*node)) |
| 3522 return; | 3522 return; |
| 3523 | 3523 |
| 3524 RefPtrWillBeRawPtr<HTMLMediaElement> mediaElement = static_pointer_cast<HTML MediaElement>(node); | 3524 RefPtrWillBeRawPtr<HTMLMediaElement> mediaElement = static_pointer_cast<HTML MediaElement>(node); |
| 3525 switch (action.type) { | 3525 switch (action.type) { |
| 3526 case WebMediaPlayerAction::Play: | 3526 case WebMediaPlayerAction::Play: |
| 3527 if (action.enable) | 3527 if (action.enable) |
| 3528 mediaElement->play(); | 3528 mediaElement->playInternal(); |
|
philipj_slow
2016/02/02 09:56:34
Dito.
mlamouri (slow - plz ping)
2016/02/03 19:28:58
Fixed.
| |
| 3529 else | 3529 else |
| 3530 mediaElement->pause(); | 3530 mediaElement->pause(); |
| 3531 break; | 3531 break; |
| 3532 case WebMediaPlayerAction::Mute: | 3532 case WebMediaPlayerAction::Mute: |
| 3533 mediaElement->setMuted(action.enable); | 3533 mediaElement->setMuted(action.enable); |
| 3534 break; | 3534 break; |
| 3535 case WebMediaPlayerAction::Loop: | 3535 case WebMediaPlayerAction::Loop: |
| 3536 mediaElement->setLoop(action.enable); | 3536 mediaElement->setLoop(action.enable); |
| 3537 break; | 3537 break; |
| 3538 case WebMediaPlayerAction::Controls: | 3538 case WebMediaPlayerAction::Controls: |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4630 { | 4630 { |
| 4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than | 4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than |
| 4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4633 if (!page()) | 4633 if (!page()) |
| 4634 return 1; | 4634 return 1; |
| 4635 | 4635 |
| 4636 return page()->deviceScaleFactor(); | 4636 return page()->deviceScaleFactor(); |
| 4637 } | 4637 } |
| 4638 | 4638 |
| 4639 } // namespace blink | 4639 } // namespace blink |
| OLD | NEW |