diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 21:01:21 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 21:01:21 +0000 |
commit | a1e41bb29757069588adfbb1ea0fe47b0a6b2237 (patch) | |
tree | 5a6f3418d10eeed97672502561b61da9191d1314 /chrome_frame | |
parent | 5d4f7f86104885599e7bb3f9ffae65d68757f828 (diff) | |
download | chromium_src-a1e41bb29757069588adfbb1ea0fe47b0a6b2237.zip chromium_src-a1e41bb29757069588adfbb1ea0fe47b0a6b2237.tar.gz chromium_src-a1e41bb29757069588adfbb1ea0fe47b0a6b2237.tar.bz2 |
base::Bind: Remove includes of base.bind in header files.
BUG=none
TEST=none
R=ajwong
Review URL: http://codereview.chromium.org/8956019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame.gyp | 1 | ||||
-rw-r--r-- | chrome_frame/custom_sync_call_context.cc | 46 | ||||
-rw-r--r-- | chrome_frame/custom_sync_call_context.h | 38 |
3 files changed, 53 insertions, 32 deletions
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_; |