| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome_frame/external_tab.h" | 5 #include "chrome_frame/external_tab.h" |
| 6 #include "base/singleton.h" | 6 #include "base/singleton.h" |
| 7 #include "base/tracked.h" | 7 #include "base/tracked.h" |
| 8 #include "base/task.h" | 8 #include "base/task.h" |
| 9 #include "base/waitable_event.h" | 9 #include "base/waitable_event.h" |
| 10 #include "chrome/common/automation_messages.h" | 10 #include "chrome/test/automation/automation_messages.h" |
| 11 #include "chrome_frame/utils.h" | 11 #include "chrome_frame/utils.h" |
| 12 | 12 |
| 13 DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy); | 13 DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy); |
| 14 DISABLE_RUNNABLE_METHOD_REFCOUNT(UIDelegate); | 14 DISABLE_RUNNABLE_METHOD_REFCOUNT(UIDelegate); |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 Singleton<ChromeProxyFactory> g_proxy_factory; | 17 Singleton<ChromeProxyFactory> g_proxy_factory; |
| 18 | 18 |
| 19 struct UserDataHolder : public SyncMessageContext { | 19 struct UserDataHolder : public SyncMessageContext { |
| 20 explicit UserDataHolder(void* p) : data(p) {} | 20 explicit UserDataHolder(void* p) : data(p) {} |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 const std::string& target) { | 264 const std::string& target) { |
| 265 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, | 265 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, |
| 266 &UIDelegate::OnMessageFromChromeFrame, message, origin, target)); | 266 &UIDelegate::OnMessageFromChromeFrame, message, origin, target)); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void ExternalTabProxy::HandleAccelerator(const MSG& accel_message) { | 269 void ExternalTabProxy::HandleAccelerator(const MSG& accel_message) { |
| 270 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, | 270 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, |
| 271 &UIDelegate::OnHandleAccelerator, accel_message)); | 271 &UIDelegate::OnHandleAccelerator, accel_message)); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void ExternalTabProxy::HandleContextMenu( | 274 void ExternalTabProxy::HandleContextMenu(HANDLE menu_handle, int align_flags, |
| 275 HANDLE menu_handle, | 275 const IPC::ContextMenuParams& params) { |
| 276 int align_flags, | |
| 277 const IPC::MiniContextMenuParams& params) { | |
| 278 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, | 276 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, |
| 279 &UIDelegate::OnHandleContextMenu, menu_handle, align_flags, params)); | 277 &UIDelegate::OnHandleContextMenu, menu_handle, align_flags, params)); |
| 280 } | 278 } |
| 281 | 279 |
| 282 void ExternalTabProxy::TabbedOut(bool reverse) { | 280 void ExternalTabProxy::TabbedOut(bool reverse) { |
| 283 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, | 281 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, |
| 284 &UIDelegate::OnTabbedOut, reverse)); | 282 &UIDelegate::OnTabbedOut, reverse)); |
| 285 } | 283 } |
| 286 | 284 |
| 287 void ExternalTabProxy::GoToHistoryOffset(int offset) { | 285 void ExternalTabProxy::GoToHistoryOffset(int offset) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 327 } |
| 330 | 328 |
| 331 void ExternalTabProxy::TabClosed() { | 329 void ExternalTabProxy::TabClosed() { |
| 332 // TODO(stoyan): | 330 // TODO(stoyan): |
| 333 } | 331 } |
| 334 | 332 |
| 335 void ExternalTabProxy::AttachTab( | 333 void ExternalTabProxy::AttachTab( |
| 336 const IPC::AttachExternalTabParams& attach_params) { | 334 const IPC::AttachExternalTabParams& attach_params) { |
| 337 // TODO(stoyan): | 335 // TODO(stoyan): |
| 338 } | 336 } |
| OLD | NEW |