OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser/external_tab_container.h" | 5 #include "chrome/browser/external_tab_container.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/win_util.h" | 10 #include "app/win_util.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 bool ExternalTabContainer::ExecuteContextMenuCommand(int command) { | 452 bool ExternalTabContainer::ExecuteContextMenuCommand(int command) { |
453 if (!external_context_menu_.get()) { | 453 if (!external_context_menu_.get()) { |
454 NOTREACHED(); | 454 NOTREACHED(); |
455 return false; | 455 return false; |
456 } | 456 } |
457 | 457 |
458 external_context_menu_->ExecuteCommand(command); | 458 external_context_menu_->ExecuteCommand(command); |
459 return true; | 459 return true; |
460 } | 460 } |
461 | 461 |
462 bool ExternalTabContainer::HandleKeyboardEvent( | 462 bool ExternalTabContainer::PreHandleKeyboardEvent( |
| 463 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { |
| 464 return false; |
| 465 } |
| 466 |
| 467 void ExternalTabContainer::HandleKeyboardEvent( |
463 const NativeWebKeyboardEvent& event) { | 468 const NativeWebKeyboardEvent& event) { |
464 return ProcessUnhandledKeyStroke(event.os_event.hwnd, | 469 ProcessUnhandledKeyStroke(event.os_event.hwnd, event.os_event.message, |
465 event.os_event.message, | 470 event.os_event.wParam, event.os_event.lParam); |
466 event.os_event.wParam, | |
467 event.os_event.lParam); | |
468 } | 471 } |
469 | 472 |
470 void ExternalTabContainer::ShowHtmlDialog(HtmlDialogUIDelegate* delegate, | 473 void ExternalTabContainer::ShowHtmlDialog(HtmlDialogUIDelegate* delegate, |
471 gfx::NativeWindow parent_window) { | 474 gfx::NativeWindow parent_window) { |
472 if (!browser_.get()) { | 475 if (!browser_.get()) { |
473 browser_.reset(Browser::CreateForPopup(tab_contents_->profile())); | 476 browser_.reset(Browser::CreateForPopup(tab_contents_->profile())); |
474 } | 477 } |
475 | 478 |
476 gfx::NativeWindow parent = parent_window ? parent_window | 479 gfx::NativeWindow parent = parent_window ? parent_window |
477 : GetParent(); | 480 : GetParent(); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 void ExternalTabContainer::InitializeAutomationRequestContext( | 712 void ExternalTabContainer::InitializeAutomationRequestContext( |
710 int tab_handle) { | 713 int tab_handle) { |
711 request_context_ = | 714 request_context_ = |
712 AutomationRequestContext::CreateAutomationURLRequestContextForTab( | 715 AutomationRequestContext::CreateAutomationURLRequestContextForTab( |
713 tab_handle, tab_contents_->profile(), | 716 tab_handle, tab_contents_->profile(), |
714 automation_resource_message_filter_); | 717 automation_resource_message_filter_); |
715 | 718 |
716 DCHECK(request_context_.get() != NULL); | 719 DCHECK(request_context_.get() != NULL); |
717 tab_contents_->set_request_context(request_context_.get()); | 720 tab_contents_->set_request_context(request_context_.get()); |
718 } | 721 } |
719 | |
OLD | NEW |