Commit ca766f78 authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Small cleanup in MediaPlayerPrivateFullscreenWindow

Reviewed by Sam Weinig.

* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow): Moved
code here from close(), since this was the only place that called it after the following
change to createWindow.
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Replaced code that handled the
case where we had already created the window with an assertion that we have not already done
so. Our single caller (FullscreenVideoController) did not require this behavior.

* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Removed layerView.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 971b4cdf
2011-01-26 Adam Roben <aroben@apple.com>
Small cleanup in MediaPlayerPrivateFullscreenWindow
Reviewed by Sam Weinig.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow): Moved
code here from close(), since this was the only place that called it after the following
change to createWindow.
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Replaced code that handled the
case where we had already created the window with an assertion that we have not already done
so. Our single caller (FullscreenVideoController) did not require this behavior.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Removed layerView.
2011-01-26 Sam Weinig <sam@webkit.org>
 
Reviewed by Adam Roben.
......@@ -47,8 +47,11 @@ MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow(MediaPlay
MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow()
{
if (m_hwnd)
close();
if (!m_hwnd)
return;
::DestroyWindow(m_hwnd);
ASSERT(!m_hwnd);
}
void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd)
......@@ -65,8 +68,7 @@ void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd)
windowAtom = ::RegisterClassEx(&wcex);
}
if (m_hwnd)
close();
ASSERT(!m_hwnd);
MONITORINFO mi = {0};
mi.cbSize = sizeof(MONITORINFO);
......@@ -87,12 +89,6 @@ void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd)
::SetFocus(m_hwnd);
}
void MediaPlayerPrivateFullscreenWindow::close()
{
::DestroyWindow(m_hwnd);
ASSERT(!m_hwnd);
}
#if USE(ACCELERATED_COMPOSITING)
void MediaPlayerPrivateFullscreenWindow::setRootChildLayer(PassRefPtr<PlatformCALayer> rootChild)
{
......
......@@ -53,13 +53,10 @@ public:
~MediaPlayerPrivateFullscreenWindow();
void createWindow(HWND ownerWindow);
void close();
HWND hwnd() const { return m_hwnd; }
#if USE(ACCELERATED_COMPOSITING)
CACFLayerTreeHost* layerView() const { return m_layerTreeHost.get(); }
PlatformCALayer* rootChildLayer() const { return m_rootChild.get(); }
void setRootChildLayer(PassRefPtr<PlatformCALayer>);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment