From 3e2b375b56172a400f75060bd2a827375ea44fea Mon Sep 17 00:00:00 2001 From: "jcivelli@google.com" Date: Wed, 7 Apr 2010 17:03:12 +0000 Subject: Adding the new WebPopupType to the RenderWidget creation. BUG=None TEST=Tests that all popups (select popup, autofill, browser actions, bookmark bubble...) work as expected and get the focus correctly. Review URL: http://codereview.chromium.org/1523013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43845 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_widget.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'chrome/renderer/render_widget.cc') diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 50af08f..77ec85f 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -45,7 +45,8 @@ using WebKit::WebScreenInfo; using WebKit::WebSize; using WebKit::WebTextDirection; -RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) +RenderWidget::RenderWidget(RenderThreadBase* render_thread, + WebKit::WebPopupType popup_type) : routing_id_(MSG_ROUTING_NONE), webwidget_(NULL), opener_id_(MSG_ROUTING_NONE), @@ -67,7 +68,7 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) ime_control_new_state_(false), ime_control_updated_(false), ime_control_busy_(false), - activatable_(activatable), + popup_type_(popup_type), pending_window_rect_count_(0), suppress_next_char_events_(false) { RenderProcess::current()->AddRefProcess(); @@ -86,10 +87,10 @@ RenderWidget::~RenderWidget() { /*static*/ RenderWidget* RenderWidget::Create(int32 opener_id, RenderThreadBase* render_thread, - bool activatable) { + WebKit::WebPopupType popup_type) { DCHECK(opener_id != MSG_ROUTING_NONE); scoped_refptr widget = new RenderWidget(render_thread, - activatable); + popup_type); widget->Init(opener_id); // adds reference return widget; } @@ -112,7 +113,7 @@ void RenderWidget::Init(int32 opener_id) { webwidget_ = WebPopupMenu::create(this); bool result = render_thread_->Send( - new ViewHostMsg_CreateWidget(opener_id, activatable_, &routing_id_)); + new ViewHostMsg_CreateWidget(opener_id, popup_type_, &routing_id_)); if (result) { render_thread_->AddRoute(routing_id_, this); // Take a reference on behalf of the RenderThread. This will be balanced -- cgit v1.1