Simple Cache: a few tests for rare corner cases with CRC check missing.
[chromium-blink-merge.git] / chrome_frame / custom_sync_call_context.cc
blob9544b4b2d8c38dec72334e8cfe4dc1625267334e
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome_frame/custom_sync_call_context.h"
7 #include "base/bind.h"
9 CreateExternalTabContext::CreateExternalTabContext(
10 ChromeFrameAutomationClient* client)
11 : client_(client) {
14 void CreateExternalTabContext::Completed(
15 HWND chrome_window, HWND tab_window, int tab_handle, int session_id) {
16 AutomationLaunchResult launch_result =
17 client_->CreateExternalTabComplete(chrome_window, tab_window,
18 tab_handle, session_id);
19 client_->PostTask(
20 FROM_HERE, base::Bind(&ChromeFrameAutomationClient::InitializeComplete,
21 client_.get(), launch_result));
24 BeginNavigateContext::BeginNavigateContext(ChromeFrameAutomationClient* client)
25 : client_(client) {
28 void BeginNavigateContext::Completed(
29 AutomationMsg_NavigationResponseValues response) {
30 client_->BeginNavigateCompleted(response);
33 UnloadContext::UnloadContext(
34 base::WaitableEvent* unload_done, bool* should_unload)
35 : should_unload_(should_unload),
36 unload_done_(unload_done) {
39 void UnloadContext::Completed(bool should_unload) {
40 *should_unload_ = should_unload;
41 unload_done_->Signal();
42 should_unload_ = NULL;
43 unload_done_ = NULL;
44 // This object will be destroyed after this. Cannot access any members
45 // on returning from this function.