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/test/automation/automation_messages.h" | 10 #include "chrome/common/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(HANDLE menu_handle, int align_flags, | 274 void ExternalTabProxy::HandleContextMenu( |
275 const IPC::ContextMenuParams& params) { | 275 HANDLE menu_handle, |
| 276 int align_flags, |
| 277 const IPC::MiniContextMenuParams& params) { |
276 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, | 278 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, |
277 &UIDelegate::OnHandleContextMenu, menu_handle, align_flags, params)); | 279 &UIDelegate::OnHandleContextMenu, menu_handle, align_flags, params)); |
278 } | 280 } |
279 | 281 |
280 void ExternalTabProxy::TabbedOut(bool reverse) { | 282 void ExternalTabProxy::TabbedOut(bool reverse) { |
281 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, | 283 ui_.PostTask(FROM_HERE, NewRunnableMethod(ui_delegate_, |
282 &UIDelegate::OnTabbedOut, reverse)); | 284 &UIDelegate::OnTabbedOut, reverse)); |
283 } | 285 } |
284 | 286 |
285 void ExternalTabProxy::GoToHistoryOffset(int offset) { | 287 void ExternalTabProxy::GoToHistoryOffset(int offset) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 } | 329 } |
328 | 330 |
329 void ExternalTabProxy::TabClosed() { | 331 void ExternalTabProxy::TabClosed() { |
330 // TODO(stoyan): | 332 // TODO(stoyan): |
331 } | 333 } |
332 | 334 |
333 void ExternalTabProxy::AttachTab( | 335 void ExternalTabProxy::AttachTab( |
334 const IPC::AttachExternalTabParams& attach_params) { | 336 const IPC::AttachExternalTabParams& attach_params) { |
335 // TODO(stoyan): | 337 // TODO(stoyan): |
336 } | 338 } |
OLD | NEW |