diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-18 20:44:22 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-18 20:44:22 +0000 |
commit | bb04c4ed964981493b8727cf67257d2ad6e8128b (patch) | |
tree | 0da5525bc43e817bbbd5dc0b691dfd6cdbbe322a /chrome_frame/external_tab_test.cc | |
parent | 94dde4b7d804f3e8c92fbbaf56251717f9a2cc40 (diff) | |
download | chromium_src-bb04c4ed964981493b8727cf67257d2ad6e8128b.zip chromium_src-bb04c4ed964981493b8727cf67257d2ad6e8128b.tar.gz chromium_src-bb04c4ed964981493b8727cf67257d2ad6e8128b.tar.bz2 |
base::Bind: Convert chrome_frame/.
BUG=none
TEST=none
R=csilv@chromium.org
Review URL: http://codereview.chromium.org/8555001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/external_tab_test.cc')
-rw-r--r-- | chrome_frame/external_tab_test.cc | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/chrome_frame/external_tab_test.cc b/chrome_frame/external_tab_test.cc index 0069522..5017eb2 100644 --- a/chrome_frame/external_tab_test.cc +++ b/chrome_frame/external_tab_test.cc @@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/location.h" -#include "base/task.h" -#include "base/threading/thread.h" #include "chrome_frame/external_tab.h" // #include "base/synchronization/waitable_event.h" +#include "base/bind.h" +#include "base/bind_helpers.h" +#include "base/location.h" +#include "base/threading/thread.h" #include "chrome/common/automation_messages.h" #include "chrome_frame/navigation_constraints.h" #include "chrome_frame/test/chrome_frame_test_utils.h" @@ -16,12 +17,6 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock_mutant.h" - - -// DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy); -// DISABLE_RUNNABLE_METHOD_REFCOUNT(UIDelegate); -DISABLE_RUNNABLE_METHOD_REFCOUNT(ChromeProxyDelegate); - using testing::StrictMock; using testing::_; using testing::Invoke; @@ -109,27 +104,39 @@ struct AsyncEventCreator { } void Fire_Connected(ChromeProxy* proxy, base::TimeDelta delay) { - ipc_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(delegate_, - &ChromeProxyDelegate::Connected, proxy), delay.InMilliseconds()); + ipc_loop_->PostDelayedTask( + FROM_HERE, + base::Bind(&ChromeProxyDelegate::Connected, base::Unretained(delegate_), + proxy), + delay.InMilliseconds()); } void Fire_PeerLost(ChromeProxy* proxy, ChromeProxyDelegate::DisconnectReason reason, base::TimeDelta delay) { - ipc_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(delegate_, - &ChromeProxyDelegate::PeerLost, proxy, reason), delay.InMilliseconds()); + ipc_loop_->PostDelayedTask( + FROM_HERE, + base::Bind(&ChromeProxyDelegate::PeerLost, base::Unretained(delegate_), + proxy, reason), + delay.InMilliseconds()); } void Fire_Disconnected(base::TimeDelta delay) { - ipc_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(delegate_, - &ChromeProxyDelegate::Disconnected), delay.InMilliseconds()); + ipc_loop_->PostDelayedTask( + FROM_HERE, + base::Bind(&ChromeProxyDelegate::Disconnected, + base::Unretained(delegate_)), + delay.InMilliseconds()); } void Fire_CompletedCreateTab(bool success, HWND chrome_wnd, HWND tab_window, int tab_handle, int session_id, base::TimeDelta delay) { - ipc_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(delegate_, - &ChromeProxyDelegate::Completed_CreateTab, success, chrome_wnd, - tab_window, tab_handle, session_id), delay.InMilliseconds()); + ipc_loop_->PostDelayedTask( + FROM_HERE, + base::Bind(&ChromeProxyDelegate::Completed_CreateTab, + base::Unretained(delegate_), success, chrome_wnd, tab_window, + tab_handle, session_id), + delay.InMilliseconds()); } private: |