| 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/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/win_util.h" | 9 #include "app/win_util.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) { | 514 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) { |
| 515 if (!automation_) { | 515 if (!automation_) { |
| 516 NOTREACHED(); | 516 NOTREACHED(); |
| 517 return false; | 517 return false; |
| 518 } | 518 } |
| 519 | 519 |
| 520 external_context_menu_.reset( | 520 external_context_menu_.reset( |
| 521 new RenderViewContextMenuViews(tab_contents(), params)); | 521 new RenderViewContextMenuViews(tab_contents(), params)); |
| 522 external_context_menu_->SetExternal(); | 522 external_context_menu_->SetExternal(); |
| 523 external_context_menu_->Init(); | 523 external_context_menu_->Init(); |
| 524 external_context_menu_->UpdateMenuItemStates(); |
| 524 | 525 |
| 525 POINT screen_pt = { params.x, params.y }; | 526 POINT screen_pt = { params.x, params.y }; |
| 526 MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1); | 527 MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1); |
| 527 | 528 |
| 528 IPC::ContextMenuParams ipc_params; | 529 IPC::ContextMenuParams ipc_params; |
| 529 ipc_params.screen_x = screen_pt.x; | 530 ipc_params.screen_x = screen_pt.x; |
| 530 ipc_params.screen_y = screen_pt.y; | 531 ipc_params.screen_y = screen_pt.y; |
| 531 ipc_params.link_url = params.link_url; | 532 ipc_params.link_url = params.link_url; |
| 532 ipc_params.unfiltered_link_url = params.unfiltered_link_url; | 533 ipc_params.unfiltered_link_url = params.unfiltered_link_url; |
| 533 ipc_params.src_url = params.src_url; | 534 ipc_params.src_url = params.src_url; |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 | 960 |
| 960 layout->StartRow(0, 0); | 961 layout->StartRow(0, 0); |
| 961 layout->AddView(info_bar_container); | 962 layout->AddView(info_bar_container); |
| 962 layout->StartRow(1, 0); | 963 layout->StartRow(1, 0); |
| 963 layout->AddView(tab_contents_container_); | 964 layout->AddView(tab_contents_container_); |
| 964 SetContentsView(external_tab_view); | 965 SetContentsView(external_tab_view); |
| 965 // Note that SetTabContents must be called after AddChildView is called | 966 // Note that SetTabContents must be called after AddChildView is called |
| 966 tab_contents_container_->ChangeTabContents(tab_contents_); | 967 tab_contents_container_->ChangeTabContents(tab_contents_); |
| 967 } | 968 } |
| 968 | 969 |
| OLD | NEW |