Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Unified Diff: chrome/browser/external_tab_container_win.cc

Issue 8680016: A few more base::Bind migrations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: win compile fix Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/external_tab_container_win.h ('k') | content/browser/idbbindingutilities_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/external_tab_container_win.cc
===================================================================
--- chrome/browser/external_tab_container_win.cc (revision 111368)
+++ chrome/browser/external_tab_container_win.cc (working copy)
@@ -6,6 +6,7 @@
#include <string>
+#include "base/bind.h"
#include "base/debug/trace_event.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
@@ -102,7 +103,7 @@
automation_resource_message_filter_(filter),
load_requests_via_automation_(false),
handle_top_level_requests_(false),
- external_method_factory_(this),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
pending_(false),
focus_manager_(NULL),
external_tab_view_(NULL),
@@ -198,8 +199,8 @@
// Navigate out of context since we don't have a 'tab_handle_' yet.
MessageLoop::current()->PostTask(
FROM_HERE,
- external_method_factory_.NewRunnableMethod(
- &ExternalTabContainer::Navigate, initial_url, referrer));
+ base::Bind(&ExternalTabContainer::Navigate, weak_factory_.GetWeakPtr(),
+ initial_url, referrer));
}
// We need WS_POPUP to be on the window during initialization, but
@@ -262,9 +263,8 @@
// Wait for the automation channel to be initialized before resuming pending
// render views and sending in the navigation state.
MessageLoop::current()->PostTask(
- FROM_HERE,
- external_method_factory_.NewRunnableMethod(
- &ExternalTabContainer::OnReinitialize));
+ FROM_HERE, base::Bind(&ExternalTabContainer::OnReinitialize,
+ weak_factory_.GetWeakPtr()));
if (parent_window)
SetParent(GetNativeView(), parent_window);
@@ -542,10 +542,12 @@
// In case the host needs to show UI that needs to take the focus.
::AllowSetForegroundWindow(ASFW_ANY);
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(automation_resource_message_filter_.get(),
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::IgnoreReturn<bool>(base::Bind(
&AutomationResourceMessageFilter::SendDownloadRequestToHost,
- 0, tab_handle_, request_id));
+ automation_resource_message_filter_.get(), 0, tab_handle_,
+ request_id)));
}
} else {
DLOG(WARNING) << "Downloads are only supported with host browser network "
« no previous file with comments | « chrome/browser/external_tab_container_win.h ('k') | content/browser/idbbindingutilities_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698