This source file includes following definitions.
- NON_EXPORTED_BASE
#ifndef CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_
#define CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_
#include <atlbase.h>
#include <atlwin.h>
#include <atlcrack.h>
#include <oleacc.h>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_comptr.h"
#include "content/common/content_export.h"
#include "ui/gfx/rect.h"
namespace ui {
class WindowEventTarget;
}
namespace content {
class BrowserAccessibilityManagerWin;
class CONTENT_EXPORT LegacyRenderWidgetHostHWND
: public ATL::CWindowImpl<LegacyRenderWidgetHostHWND,
NON_EXPORTED_BASE(ATL::CWindow),
ATL::CWinTraits<WS_CHILD> > {
public:
DECLARE_WND_CLASS_EX(L"Chrome_RenderWidgetHostHWND", CS_DBLCLKS, 0);
typedef ATL::CWindowImpl<LegacyRenderWidgetHostHWND,
NON_EXPORTED_BASE(ATL::CWindow),
ATL::CWinTraits<WS_CHILD> > Base;
~LegacyRenderWidgetHostHWND();
static scoped_ptr<LegacyRenderWidgetHostHWND> Create(HWND parent);
BEGIN_MSG_MAP_EX(LegacyRenderWidgetHostHWND)
MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject)
MESSAGE_RANGE_HANDLER(WM_KEYFIRST, WM_KEYLAST, OnKeyboardRange)
MESSAGE_HANDLER_EX(WM_PAINT, OnPaint)
MESSAGE_HANDLER_EX(WM_NCPAINT, OnNCPaint)
MESSAGE_HANDLER_EX(WM_ERASEBKGND, OnEraseBkGnd)
MESSAGE_RANGE_HANDLER(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
MESSAGE_HANDLER_EX(WM_MOUSELEAVE, OnMouseLeave)
MESSAGE_HANDLER_EX(WM_MOUSEACTIVATE, OnMouseActivate)
MESSAGE_HANDLER_EX(WM_SETCURSOR, OnSetCursor)
MESSAGE_HANDLER_EX(WM_TOUCH, OnTouch)
MESSAGE_HANDLER_EX(WM_HSCROLL, OnScroll)
MESSAGE_HANDLER_EX(WM_VSCROLL, OnScroll)
MESSAGE_HANDLER_EX(WM_NCHITTEST, OnNCHitTest)
MESSAGE_RANGE_HANDLER(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK,
OnMouseRange)
MESSAGE_HANDLER_EX(WM_NCCALCSIZE, OnNCCalcSize)
MESSAGE_HANDLER_EX(WM_SIZE, OnSize)
END_MSG_MAP()
HWND hwnd() { return m_hWnd; }
void UpdateParent(HWND parent);
HWND GetParent();
IAccessible* window_accessible() { return window_accessible_; }
void set_browser_accessibility_manager(
content::BrowserAccessibilityManagerWin* manager) {
manager_ = manager;
}
void OnManagerDeleted();
void Show();
void Hide();
void SetBounds(const gfx::Rect& bounds);
protected:
virtual void OnFinalMessage(HWND hwnd) OVERRIDE;
private:
LegacyRenderWidgetHostHWND(HWND parent);
bool Init();
static ui::WindowEventTarget* GetWindowEventTarget(HWND parent);
LRESULT OnEraseBkGnd(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnGetObject(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnKeyboardRange(UINT message, WPARAM w_param, LPARAM l_param,
BOOL& handled);
LRESULT OnMouseLeave(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param,
BOOL& handled);
LRESULT OnMouseActivate(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnTouch(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnScroll(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnNCHitTest(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnNCPaint(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnPaint(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnNCCalcSize(UINT message, WPARAM w_param, LPARAM l_param);
LRESULT OnSize(UINT message, WPARAM w_param, LPARAM l_param);
content::BrowserAccessibilityManagerWin* manager_;
base::win::ScopedComPtr<IAccessible> window_accessible_;
bool mouse_tracking_enabled_;
DISALLOW_COPY_AND_ASSIGN(LegacyRenderWidgetHostHWND);
};
}
#endif