This source file includes following definitions.
- Get
- OnClose
- GetHiddenWindow
#include "ui/base/win/hidden_window.h"
#include "ui/gfx/win/window_impl.h"
namespace ui {
namespace {
class TempParent : public gfx::WindowImpl {
public:
static TempParent* Get() {
static TempParent* g_temp_parent;
if (!g_temp_parent) {
g_temp_parent = new TempParent();
g_temp_parent->set_window_style(WS_POPUP);
g_temp_parent->set_window_ex_style(WS_EX_TOOLWINDOW);
g_temp_parent->Init(GetDesktopWindow(), gfx::Rect());
EnableWindow(g_temp_parent->hwnd(), FALSE);
}
return g_temp_parent;
}
private:
void OnClose() {
}
CR_BEGIN_MSG_MAP_EX(WebContentsViewWin)
CR_MSG_WM_CLOSE(OnClose)
CR_END_MSG_MAP()
};
}
HWND GetHiddenWindow() {
return TempParent::Get()->hwnd();
}
}