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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 701663002: Remove HTMLVideoElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/compositing/RenderLayerCompositor.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) 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 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 1884
1885 if (m_fixedLayoutSizeLock) 1885 if (m_fixedLayoutSizeLock)
1886 view->setLayoutSize(layoutSize); 1886 view->setLayoutSize(layoutSize);
1887 else 1887 else
1888 updateMainFrameLayoutSize(); 1888 updateMainFrameLayoutSize();
1889 } 1889 }
1890 1890
1891 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, 1891 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action,
1892 const WebPoint& location) 1892 const WebPoint& location)
1893 { 1893 {
1894 HitTestResult result = hitTestResultForWindowPos(location); 1894 // FIXME(sky): Remove this.
1895 RefPtr<Node> node = result.innerNonSharedNode();
1896 if (!isHTMLVideoElement(*node) && !isHTMLAudioElement(*node))
1897 return;
1898
1899 RefPtr<HTMLMediaElement> mediaElement = static_pointer_cast<HTMLMediaElement >(node);
1900 switch (action.type) {
1901 case WebMediaPlayerAction::Play:
1902 if (action.enable)
1903 mediaElement->play();
1904 else
1905 mediaElement->pause();
1906 break;
1907 case WebMediaPlayerAction::Mute:
1908 mediaElement->setMuted(action.enable);
1909 break;
1910 case WebMediaPlayerAction::Loop:
1911 mediaElement->setLoop(action.enable);
1912 break;
1913 case WebMediaPlayerAction::Controls:
1914 mediaElement->setBooleanAttribute(HTMLNames::controlsAttr, action.enable );
1915 break;
1916 default:
1917 ASSERT_NOT_REACHED();
1918 }
1919 } 1895 }
1920 1896
1921 WebHitTestResult WebViewImpl::hitTestResultAt(const WebPoint& point) 1897 WebHitTestResult WebViewImpl::hitTestResultAt(const WebPoint& point)
1922 { 1898 {
1923 return coreHitTestResultAt(point); 1899 return coreHitTestResultAt(point);
1924 } 1900 }
1925 1901
1926 HitTestResult WebViewImpl::coreHitTestResultAt(const WebPoint& point) 1902 HitTestResult WebViewImpl::coreHitTestResultAt(const WebPoint& point)
1927 { 1903 {
1928 IntPoint scaledPoint = point; 1904 IntPoint scaledPoint = point;
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 m_layerTreeView->setVisible(visible); 2380 m_layerTreeView->setVisible(visible);
2405 } 2381 }
2406 } 2382 }
2407 2383
2408 bool WebViewImpl::shouldDisableDesktopWorkarounds() 2384 bool WebViewImpl::shouldDisableDesktopWorkarounds()
2409 { 2385 {
2410 return true; 2386 return true;
2411 } 2387 }
2412 2388
2413 } // namespace blink 2389 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698