#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 content {
-class BrowserAccessibilityManagerWin;
+class RenderWidgetHostViewAura;
// Reasons for the existence of this class outlined below:-
// 1. Some screen readers expect every tab / every unique web content container
NON_EXPORTED_BASE(ATL::CWindow),
ATL::CWinTraits<WS_CHILD> > Base;
- ~LegacyRenderWidgetHostHWND();
-
// Creates and returns an instance of the LegacyRenderWidgetHostHWND class on
// successful creation of a child window parented to the parent window passed
// in.
- static scoped_ptr<LegacyRenderWidgetHostHWND> Create(HWND parent);
+ static LegacyRenderWidgetHostHWND* Create(HWND parent);
+
+ // Destroys the HWND managed by this class.
+ void Destroy();
BEGIN_MSG_MAP_EX(LegacyRenderWidgetHostHWND)
MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject)
IAccessible* window_accessible() { return window_accessible_; }
- void set_browser_accessibility_manager(
- content::BrowserAccessibilityManagerWin* manager) {
- manager_ = manager;
- }
-
- void OnManagerDeleted();
-
// Functions to show and hide the window.
void Show();
void Hide();
// Resizes the window to the bounds passed in.
void SetBounds(const gfx::Rect& bounds);
+ // The pointer to the containing RenderWidgetHostViewAura instance is passed
+ // here.
+ void set_host(RenderWidgetHostViewAura* host) {
+ host_ = host;
+ }
+
protected:
virtual void OnFinalMessage(HWND hwnd) OVERRIDE;
private:
LegacyRenderWidgetHostHWND(HWND parent);
+ ~LegacyRenderWidgetHostHWND();
bool Init();
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_;
// Set to true if we turned on mouse tracking.
bool mouse_tracking_enabled_;
+ RenderWidgetHostViewAura* host_;
+
DISALLOW_COPY_AND_ASSIGN(LegacyRenderWidgetHostHWND);
};