| 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" | |
| 10 #include "app/win_util.h" | 9 #include "app/win_util.h" |
| 10 #include "base/i18n/rtl.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/win_util.h" | 12 #include "base/win_util.h" |
| 13 #include "chrome/app/chrome_dll_resource.h" | 13 #include "chrome/app/chrome_dll_resource.h" |
| 14 #include "chrome/browser/automation/automation_provider.h" | 14 #include "chrome/browser/automation/automation_provider.h" |
| 15 #include "chrome/browser/automation/automation_extension_function.h" | 15 #include "chrome/browser/automation/automation_extension_function.h" |
| 16 #include "chrome/browser/browser_window.h" | 16 #include "chrome/browser/browser_window.h" |
| 17 #include "chrome/browser/debugger/devtools_manager.h" | 17 #include "chrome/browser/debugger/devtools_manager.h" |
| 18 #include "chrome/browser/load_notification_details.h" | 18 #include "chrome/browser/load_notification_details.h" |
| 19 #include "chrome/browser/page_info_window.h" | 19 #include "chrome/browser/page_info_window.h" |
| 20 #include "chrome/browser/profile.h" | 20 #include "chrome/browser/profile.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 | 532 |
| 533 IPC::ContextMenuParams ipc_params; | 533 IPC::ContextMenuParams ipc_params; |
| 534 ipc_params.screen_x = screen_pt.x; | 534 ipc_params.screen_x = screen_pt.x; |
| 535 ipc_params.screen_y = screen_pt.y; | 535 ipc_params.screen_y = screen_pt.y; |
| 536 ipc_params.link_url = params.link_url; | 536 ipc_params.link_url = params.link_url; |
| 537 ipc_params.unfiltered_link_url = params.unfiltered_link_url; | 537 ipc_params.unfiltered_link_url = params.unfiltered_link_url; |
| 538 ipc_params.src_url = params.src_url; | 538 ipc_params.src_url = params.src_url; |
| 539 ipc_params.page_url = params.page_url; | 539 ipc_params.page_url = params.page_url; |
| 540 ipc_params.frame_url = params.frame_url; | 540 ipc_params.frame_url = params.frame_url; |
| 541 | 541 |
| 542 bool rtl = l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT; | 542 bool rtl = base::i18n::IsRTL(); |
| 543 automation_->Send( | 543 automation_->Send( |
| 544 new AutomationMsg_ForwardContextMenuToExternalHost(0, tab_handle_, | 544 new AutomationMsg_ForwardContextMenuToExternalHost(0, tab_handle_, |
| 545 external_context_menu_->GetMenuHandle(), | 545 external_context_menu_->GetMenuHandle(), |
| 546 rtl ? TPM_RIGHTALIGN : TPM_LEFTALIGN, ipc_params)); | 546 rtl ? TPM_RIGHTALIGN : TPM_LEFTALIGN, ipc_params)); |
| 547 | 547 |
| 548 return true; | 548 return true; |
| 549 } | 549 } |
| 550 | 550 |
| 551 bool ExternalTabContainer::ExecuteContextMenuCommand(int command) { | 551 bool ExternalTabContainer::ExecuteContextMenuCommand(int command) { |
| 552 if (!external_context_menu_.get()) { | 552 if (!external_context_menu_.get()) { |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 | 950 |
| 951 layout->StartRow(0, 0); | 951 layout->StartRow(0, 0); |
| 952 layout->AddView(info_bar_container); | 952 layout->AddView(info_bar_container); |
| 953 layout->StartRow(1, 0); | 953 layout->StartRow(1, 0); |
| 954 layout->AddView(tab_contents_container_); | 954 layout->AddView(tab_contents_container_); |
| 955 SetContentsView(external_tab_view); | 955 SetContentsView(external_tab_view); |
| 956 // Note that SetTabContents must be called after AddChildView is called | 956 // Note that SetTabContents must be called after AddChildView is called |
| 957 tab_contents_container_->ChangeTabContents(tab_contents_); | 957 tab_contents_container_->ChangeTabContents(tab_contents_); |
| 958 } | 958 } |
| 959 | 959 |
| OLD | NEW |