summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 20:21:11 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 20:21:11 +0000
commitcfd727ff8ea3e853a5e2f7c39cd1902fac090ecb (patch)
treee4f752f4fa1c3985abe91af25e7918c90a59768f /chrome/renderer/render_widget.cc
parent9b341774ce43e4034ac4465997b31e7b15fa1928 (diff)
downloadchromium_src-cfd727ff8ea3e853a5e2f7c39cd1902fac090ecb.zip
chromium_src-cfd727ff8ea3e853a5e2f7c39cd1902fac090ecb.tar.gz
chromium_src-cfd727ff8ea3e853a5e2f7c39cd1902fac090ecb.tar.bz2
The popup for autofill is now never activated, even when clicked.
This allows us to hide it when the page loses focus. (doing that previously would have caused the popup to be hidden before the click in the popup was sent to the renderer). Most of the file changes are just renaming focus_on_show to activatable. TEST=Open a form and make an autofill popup. Focus another window, the popup should disappear. Ensure the autofill still work properly, and the combo-box as well. BUG=3844,5830 Review URL: http://codereview.chromium.org/17455 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.cc')
-rw-r--r--chrome/renderer/render_widget.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index a213c83..82a7fe7 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -69,8 +69,7 @@ DeferredCloses* DeferredCloses::current_ = NULL;
///////////////////////////////////////////////////////////////////////////////
-RenderWidget::RenderWidget(RenderThreadBase* render_thread,
- bool focus_on_show)
+RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable)
: routing_id_(MSG_ROUTING_NONE),
opener_id_(MSG_ROUTING_NONE),
render_thread_(render_thread),
@@ -91,7 +90,7 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread,
ime_control_new_state_(false),
ime_control_updated_(false),
ime_control_busy_(false),
- focus_on_show_(focus_on_show) {
+ activatable_(activatable) {
RenderProcess::AddRefProcess();
DCHECK(render_thread_);
}
@@ -111,10 +110,10 @@ RenderWidget::~RenderWidget() {
/*static*/
RenderWidget* RenderWidget::Create(int32 opener_id,
RenderThreadBase* render_thread,
- bool focus_on_show) {
+ bool activatable) {
DCHECK(opener_id != MSG_ROUTING_NONE);
scoped_refptr<RenderWidget> widget = new RenderWidget(render_thread,
- focus_on_show);
+ activatable);
widget->Init(opener_id); // adds reference
return widget;
}
@@ -130,7 +129,7 @@ void RenderWidget::Init(int32 opener_id) {
webwidget_.swap(&webwidget);
bool result = render_thread_->Send(
- new ViewHostMsg_CreateWidget(opener_id, focus_on_show_, &routing_id_));
+ new ViewHostMsg_CreateWidget(opener_id, activatable_, &routing_id_));
if (result) {
render_thread_->AddRoute(routing_id_, this);
// Take a reference on behalf of the RenderThread. This will be balanced