summaryrefslogtreecommitdiffstats
path: root/content/renderer/renderer_accessibility.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 23:39:41 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 23:39:41 +0000
commit3b7d175ec60256f812c41c093234f408e87d86f4 (patch)
treea0c338eb796e9c9f48deeac5af0ea92d5123a5ba /content/renderer/renderer_accessibility.cc
parent2d7dfa4ac535d675a65a6ba22094c9e2e7d722c7 (diff)
downloadchromium_src-3b7d175ec60256f812c41c093234f408e87d86f4.zip
chromium_src-3b7d175ec60256f812c41c093234f408e87d86f4.tar.gz
chromium_src-3b7d175ec60256f812c41c093234f408e87d86f4.tar.bz2
Convert stragglers not on spreadsheet to base::Bind()
BUG=none TEST=none Review URL: http://codereview.chromium.org/9035002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/renderer_accessibility.cc')
-rw-r--r--content/renderer/renderer_accessibility.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/content/renderer/renderer_accessibility.cc b/content/renderer/renderer_accessibility.cc
index 43e8f5b..078a3a6 100644
--- a/content/renderer/renderer_accessibility.cc
+++ b/content/renderer/renderer_accessibility.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind.h"
#include "base/command_line.h"
#include "content/common/view_messages.h"
#include "content/public/common/content_switches.h"
@@ -82,7 +83,7 @@ bool WebAccessibilityNotificationToViewHostMsg(
RendererAccessibility::RendererAccessibility(RenderViewImpl* render_view)
: content::RenderViewObserver(render_view),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
browser_root_(NULL),
last_scroll_offset_(gfx::Size()),
ack_pending_(false),
@@ -195,14 +196,15 @@ void RendererAccessibility::PostAccessibilityNotification(
}
pending_notifications_.push_back(acc_notification);
- if (!ack_pending_ && method_factory_.empty()) {
+ if (!ack_pending_ && !weak_factory_.HasWeakPtrs()) {
// When no accessibility notifications are in-flight post a task to send
// the notifications to the browser. We use PostTask so that we can queue
// up additional notifications.
MessageLoop::current()->PostTask(
FROM_HERE,
- method_factory_.NewRunnableMethod(
- &RendererAccessibility::SendPendingAccessibilityNotifications));
+ base::Bind(
+ &RendererAccessibility::SendPendingAccessibilityNotifications,
+ weak_factory_.GetWeakPtr()));
}
}