diff options
22 files changed, 76 insertions, 52 deletions
diff --git a/base/threading/post_task_and_reply_impl.h b/base/threading/post_task_and_reply_impl.h index d2bbac7..fe19c8e 100644 --- a/base/threading/post_task_and_reply_impl.h +++ b/base/threading/post_task_and_reply_impl.h @@ -9,7 +9,7 @@ #define BASE_THREADING_POST_TASK_AND_REPLY_IMPL_H_ #pragma once -#include "base/bind.h" +#include "base/callback_forward.h" #include "base/location.h" namespace base { diff --git a/chrome/browser/extensions/settings/settings_storage_unittest.h b/chrome/browser/extensions/settings/settings_storage_unittest.h index dc2079f..890b8aa 100644 --- a/chrome/browser/extensions/settings/settings_storage_unittest.h +++ b/chrome/browser/extensions/settings/settings_storage_unittest.h @@ -8,7 +8,6 @@ #include "testing/gtest/include/gtest/gtest.h" -#include "base/bind.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" diff --git a/chrome/browser/favicon/favicon_handler.h b/chrome/browser/favicon/favicon_handler.h index 674f8f3..058674f 100644 --- a/chrome/browser/favicon/favicon_handler.h +++ b/chrome/browser/favicon/favicon_handler.h @@ -9,7 +9,6 @@ #include <map> #include "base/basictypes.h" -#include "base/bind.h" #include "base/callback_forward.h" #include "base/memory/ref_counted.h" #include "chrome/browser/favicon/favicon_service.h" diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h index 216fe24..41d454d 100644 --- a/chrome/browser/favicon/favicon_tab_helper.h +++ b/chrome/browser/favicon/favicon_tab_helper.h @@ -9,7 +9,7 @@ #include <vector> #include "base/basictypes.h" -#include "base/bind.h" +#include "base/callback.h" #include "chrome/browser/favicon/favicon_handler_delegate.h" #include "chrome/browser/favicon/favicon_service.h" #include "chrome/common/favicon_url.h" diff --git a/chrome/browser/net/network_stats.h b/chrome/browser/net/network_stats.h index c18bf91..8b15a94 100644 --- a/chrome/browser/net/network_stats.h +++ b/chrome/browser/net/network_stats.h @@ -9,7 +9,6 @@ #include <string> #include "base/basictypes.h" -#include "base/bind.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/string_util.h" diff --git a/chrome/browser/net/sqlite_origin_bound_cert_store.h b/chrome/browser/net/sqlite_origin_bound_cert_store.h index 8ddc90f..8ade51e 100644 --- a/chrome/browser/net/sqlite_origin_bound_cert_store.h +++ b/chrome/browser/net/sqlite_origin_bound_cert_store.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_NET_SQLITE_ORIGIN_BOUND_CERT_STORE_H_ #pragma once -#include "base/bind.h" +#include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "net/base/default_origin_bound_cert_store.h" diff --git a/chrome/browser/sync/util/weak_handle.cc b/chrome/browser/sync/util/weak_handle.cc index d751d48..040841f 100644 --- a/chrome/browser/sync/util/weak_handle.cc +++ b/chrome/browser/sync/util/weak_handle.cc @@ -6,6 +6,7 @@ #include <sstream> +#include "base/callback.h" #include "base/location.h" #include "base/message_loop_proxy.h" diff --git a/chrome/browser/sync/util/weak_handle.h b/chrome/browser/sync/util/weak_handle.h index 3c92697..28bfeda 100644 --- a/chrome/browser/sync/util/weak_handle.h +++ b/chrome/browser/sync/util/weak_handle.h @@ -52,7 +52,7 @@ #include "base/basictypes.h" #include "base/bind.h" -#include "base/callback.h" +#include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/location.h" diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc index 7792f30..9c64749 100644 --- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc +++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc @@ -115,6 +115,12 @@ WebUIHandlerTaskProxy::WebUIHandlerTaskProxy(Delegate* delegate) { WebUIHandlerTaskProxy::~WebUIHandlerTaskProxy() { } +void WebUIHandlerTaskProxy::DeleteOnUIThread() { + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&WebUIHandlerTaskProxy::DoNothing, this)); +} + //////////////////////////////////////////////////////////////////////////////// // // WebUIHandler diff --git a/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h b/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h index c8cf680..b8df573 100644 --- a/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h +++ b/chrome/browser/ui/webui/chromeos/imageburner/webui_handler.h @@ -8,7 +8,6 @@ #include <string> -#include "base/bind.h" #include "base/file_path.h" #include "base/string16.h" #include "base/values.h" @@ -56,11 +55,7 @@ class WebUIHandlerTaskProxy // WebUIHandlerTaskProxy is created on the UI thread, so in some cases, // we need to post back to the UI thread for destruction. - void DeleteOnUIThread() { - BrowserThread::PostTask( - BrowserThread::UI, FROM_HERE, - base::Bind(&WebUIHandlerTaskProxy::DoNothing, this)); - } + void DeleteOnUIThread(); void DoNothing() {} diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp index 5594b04..a1c3c6e 100644 --- a/chrome_frame/chrome_frame.gyp +++ b/chrome_frame/chrome_frame.gyp @@ -812,6 +812,7 @@ 'chrome_frame_plugin.h', 'chrome_launcher_utils.cc', 'chrome_launcher_utils.h', + 'custom_sync_call_context.cc', 'custom_sync_call_context.h', 'external_tab.h', 'external_tab.cc', diff --git a/chrome_frame/custom_sync_call_context.cc b/chrome_frame/custom_sync_call_context.cc new file mode 100644 index 0000000..9544b4b --- /dev/null +++ b/chrome_frame/custom_sync_call_context.cc @@ -0,0 +1,46 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome_frame/custom_sync_call_context.h" + +#include "base/bind.h" + +CreateExternalTabContext::CreateExternalTabContext( + ChromeFrameAutomationClient* client) + : client_(client) { +} + +void CreateExternalTabContext::Completed( + HWND chrome_window, HWND tab_window, int tab_handle, int session_id) { + AutomationLaunchResult launch_result = + client_->CreateExternalTabComplete(chrome_window, tab_window, + tab_handle, session_id); + client_->PostTask( + FROM_HERE, base::Bind(&ChromeFrameAutomationClient::InitializeComplete, + client_.get(), launch_result)); +} + +BeginNavigateContext::BeginNavigateContext(ChromeFrameAutomationClient* client) + : client_(client) { +} + +void BeginNavigateContext::Completed( + AutomationMsg_NavigationResponseValues response) { + client_->BeginNavigateCompleted(response); +} + +UnloadContext::UnloadContext( + base::WaitableEvent* unload_done, bool* should_unload) + : should_unload_(should_unload), + unload_done_(unload_done) { +} + +void UnloadContext::Completed(bool should_unload) { + *should_unload_ = should_unload; + unload_done_->Signal(); + should_unload_ = NULL; + unload_done_ = NULL; + // This object will be destroyed after this. Cannot access any members + // on returning from this function. +} diff --git a/chrome_frame/custom_sync_call_context.h b/chrome_frame/custom_sync_call_context.h index e2691b8..58e8476 100644 --- a/chrome_frame/custom_sync_call_context.h +++ b/chrome_frame/custom_sync_call_context.h @@ -7,35 +7,22 @@ #include <vector> -#include "base/bind.h" #include "base/memory/ref_counted.h" #include "base/synchronization/waitable_event.h" #include "chrome_frame/sync_msg_reply_dispatcher.h" #include "chrome_frame/chrome_frame_automation.h" #include "ipc/ipc_sync_message.h" -// TODO(ananta) -// Move the implementations of these classes to the source file. - // Class that maintains contextual information for the create and connect // external tab operations. class CreateExternalTabContext : public SyncMessageReplyDispatcher::SyncMessageCallContext { public: typedef Tuple4<HWND, HWND, int, int> output_type; - explicit CreateExternalTabContext(ChromeFrameAutomationClient* client) - : client_(client) { - } + explicit CreateExternalTabContext(ChromeFrameAutomationClient* client); void Completed(HWND chrome_window, HWND tab_window, int tab_handle, - int session_id) { - AutomationLaunchResult launch_result = - client_->CreateExternalTabComplete(chrome_window, tab_window, - tab_handle, session_id); - client_->PostTask( - FROM_HERE, base::Bind(&ChromeFrameAutomationClient::InitializeComplete, - client_.get(), launch_result)); - } + int session_id); private: scoped_refptr<ChromeFrameAutomationClient> client_; @@ -46,14 +33,11 @@ class CreateExternalTabContext class BeginNavigateContext : public SyncMessageReplyDispatcher::SyncMessageCallContext { public: - explicit BeginNavigateContext(ChromeFrameAutomationClient* client) - : client_(client) {} + explicit BeginNavigateContext(ChromeFrameAutomationClient* client); typedef Tuple1<AutomationMsg_NavigationResponseValues> output_type; - void Completed(AutomationMsg_NavigationResponseValues response) { - client_->BeginNavigateCompleted(response); - } + void Completed(AutomationMsg_NavigationResponseValues response); private: scoped_refptr<ChromeFrameAutomationClient> client_; @@ -65,19 +49,9 @@ class UnloadContext : public SyncMessageReplyDispatcher::SyncMessageCallContext { public: typedef Tuple1<bool> output_type; - UnloadContext(base::WaitableEvent* unload_done, bool* should_unload) - : should_unload_(should_unload), - unload_done_(unload_done) { - } + UnloadContext(base::WaitableEvent* unload_done, bool* should_unload); - void Completed(bool should_unload) { - *should_unload_ = should_unload; - unload_done_->Signal(); - should_unload_ = NULL; - unload_done_ = NULL; - // This object will be destroyed after this. Cannot access any members - // on returning from this function. - } + void Completed(bool should_unload); private: base::WaitableEvent* unload_done_; diff --git a/content/browser/geolocation/device_data_provider.h b/content/browser/geolocation/device_data_provider.h index ba3fb8f..4466f91 100644 --- a/content/browser/geolocation/device_data_provider.h +++ b/content/browser/geolocation/device_data_provider.h @@ -193,7 +193,7 @@ class DeviceDataProviderImplBase : public DeviceDataProviderImplBaseHack { // Calls DeviceDataUpdateAvailable() on all registered listeners. typedef std::set<ListenerInterface*> ListenersSet; void NotifyListeners() { - // Always make the nitofy callback via a posted task, se we can unwind + // Always make the notify callback via a posted task, so we can unwind // callstack here and make callback without causing client re-entrancy. client_loop_->PostTask(FROM_HERE, base::Bind( &DeviceDataProviderImplBase<DataType>::NotifyListenersInClientLoop, diff --git a/media/base/download_rate_monitor.h b/media/base/download_rate_monitor.h index e3b29dd..4fca328 100644 --- a/media/base/download_rate_monitor.h +++ b/media/base/download_rate_monitor.h @@ -7,7 +7,6 @@ #include <deque> -#include "base/bind.h" #include "base/callback.h" #include "base/time.h" #include "media/base/media_export.h" diff --git a/media/base/download_rate_monitor_unittest.cc b/media/base/download_rate_monitor_unittest.cc index 496d3a0..321ad63 100644 --- a/media/base/download_rate_monitor_unittest.cc +++ b/media/base/download_rate_monitor_unittest.cc @@ -4,6 +4,8 @@ #include "media/base/download_rate_monitor.h" +#include "base/bind.h" +#include "base/bind_helpers.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/net/base/cookie_store_test_helpers.cc b/net/base/cookie_store_test_helpers.cc index afc5c67..add1483 100644 --- a/net/base/cookie_store_test_helpers.cc +++ b/net/base/cookie_store_test_helpers.cc @@ -4,6 +4,7 @@ #include "net/base/cookie_store_test_helpers.h" +#include "base/bind.h" #include "base/message_loop.h" namespace net { diff --git a/net/base/cookie_store_test_helpers.h b/net/base/cookie_store_test_helpers.h index de9f575..3474655 100644 --- a/net/base/cookie_store_test_helpers.h +++ b/net/base/cookie_store_test_helpers.h @@ -11,7 +11,7 @@ #include <string> #include <vector> -#include "base/bind.h" +#include "base/callback_forward.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { diff --git a/net/base/default_origin_bound_cert_store.h b/net/base/default_origin_bound_cert_store.h index f5e0394..8f9a3e3 100644 --- a/net/base/default_origin_bound_cert_store.h +++ b/net/base/default_origin_bound_cert_store.h @@ -10,7 +10,7 @@ #include <string> #include <vector> -#include "base/bind.h" +#include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/synchronization/lock.h" @@ -22,7 +22,7 @@ class Task; namespace net { // This class is the system for storing and retrieving origin bound certs. -// Modelled after the CookieMonster class, it has an in-memory cert store, +// Modeled after the CookieMonster class, it has an in-memory cert store, // and synchronizes origin bound certs to an optional permanent storage that // implements the PersistentStore interface. The use case is described in // http://balfanz.github.com/tls-obc-spec/draft-balfanz-tls-obc-00.html diff --git a/remoting/base/scoped_thread_proxy.cc b/remoting/base/scoped_thread_proxy.cc index b526d6af..d1dcc26 100644 --- a/remoting/base/scoped_thread_proxy.cc +++ b/remoting/base/scoped_thread_proxy.cc @@ -4,6 +4,8 @@ #include "remoting/base/scoped_thread_proxy.h" +#include "base/bind.h" + namespace remoting { class ScopedThreadProxy::Core : public base::RefCountedThreadSafe<Core> { diff --git a/remoting/base/scoped_thread_proxy.h b/remoting/base/scoped_thread_proxy.h index 63dcaf8..2ec9b5b 100644 --- a/remoting/base/scoped_thread_proxy.h +++ b/remoting/base/scoped_thread_proxy.h @@ -5,7 +5,7 @@ #ifndef REMOTING_BASE_SCOPED_THREAD_PROXY_H_ #define REMOTING_BASE_SCOPED_THREAD_PROXY_H_ -#include "base/bind.h" +#include "base/callback_forward.h" #include "base/message_loop_proxy.h" namespace remoting { diff --git a/ui/gfx/surface/accelerated_surface_mac.h b/ui/gfx/surface/accelerated_surface_mac.h index e63154b..7cf534b 100644 --- a/ui/gfx/surface/accelerated_surface_mac.h +++ b/ui/gfx/surface/accelerated_surface_mac.h @@ -8,7 +8,7 @@ #include <CoreFoundation/CoreFoundation.h> -#include "base/bind.h" +#include "base/callback.h" #include "base/mac/scoped_cftyperef.h" #include "base/memory/scoped_ptr.h" #include "ui/gfx/gl/gl_context.h" |