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_win.h" | 5 #include "chrome/browser/external_tab_container_win.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/scoped_prop.h" | 10 #include "app/win/scoped_prop.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/page_info_window.h" | 23 #include "chrome/browser/page_info_window.h" |
24 #include "chrome/browser/profile.h" | 24 #include "chrome/browser/profile.h" |
25 #include "chrome/browser/renderer_host/render_process_host.h" | 25 #include "chrome/browser/renderer_host/render_process_host.h" |
26 #include "chrome/browser/renderer_host/render_view_host.h" | 26 #include "chrome/browser/renderer_host/render_view_host.h" |
27 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 27 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
28 #include "chrome/browser/tab_contents/provisional_load_details.h" | 28 #include "chrome/browser/tab_contents/provisional_load_details.h" |
29 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" | 29 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" |
30 #include "chrome/browser/tab_contents/tab_contents.h" | 30 #include "chrome/browser/tab_contents/tab_contents.h" |
31 #include "chrome/browser/views/page_info_bubble_view.h" | 31 #include "chrome/browser/views/page_info_bubble_view.h" |
32 #include "chrome/browser/views/tab_contents/tab_contents_container.h" | 32 #include "chrome/browser/views/tab_contents/tab_contents_container.h" |
33 #include "chrome/common/automation_messages.h" | |
34 #include "chrome/common/bindings_policy.h" | 33 #include "chrome/common/bindings_policy.h" |
35 #include "chrome/common/chrome_constants.h" | 34 #include "chrome/common/chrome_constants.h" |
36 #include "chrome/common/render_messages.h" | 35 #include "chrome/common/render_messages.h" |
37 #include "chrome/common/render_messages_params.h" | 36 #include "chrome/common/render_messages_params.h" |
38 #include "chrome/common/native_web_keyboard_event.h" | 37 #include "chrome/common/native_web_keyboard_event.h" |
39 #include "chrome/common/notification_service.h" | 38 #include "chrome/common/notification_service.h" |
40 #include "chrome/common/page_transition_types.h" | 39 #include "chrome/common/page_transition_types.h" |
| 40 #include "chrome/test/automation/automation_messages.h" |
41 #include "grit/generated_resources.h" | 41 #include "grit/generated_resources.h" |
42 #include "grit/locale_settings.h" | 42 #include "grit/locale_settings.h" |
43 #include "views/grid_layout.h" | 43 #include "views/grid_layout.h" |
44 #include "views/widget/root_view.h" | 44 #include "views/widget/root_view.h" |
45 #include "views/window/window.h" | 45 #include "views/window/window.h" |
46 | 46 |
47 static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject"; | 47 static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject"; |
48 | 48 |
49 // This class overrides the LinkActivated function in the PageInfoBubbleView | 49 // This class overrides the LinkActivated function in the PageInfoBubbleView |
50 // class and routes the help center link navigation to the host browser. | 50 // class and routes the help center link navigation to the host browser. |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 } | 611 } |
612 external_context_menu_.reset( | 612 external_context_menu_.reset( |
613 new RenderViewContextMenuViews(tab_contents(), params)); | 613 new RenderViewContextMenuViews(tab_contents(), params)); |
614 external_context_menu_->SetExternal(); | 614 external_context_menu_->SetExternal(); |
615 external_context_menu_->Init(); | 615 external_context_menu_->Init(); |
616 external_context_menu_->UpdateMenuItemStates(); | 616 external_context_menu_->UpdateMenuItemStates(); |
617 | 617 |
618 POINT screen_pt = { params.x, params.y }; | 618 POINT screen_pt = { params.x, params.y }; |
619 MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1); | 619 MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1); |
620 | 620 |
621 IPC::MiniContextMenuParams ipc_params; | 621 IPC::ContextMenuParams ipc_params; |
622 ipc_params.screen_x = screen_pt.x; | 622 ipc_params.screen_x = screen_pt.x; |
623 ipc_params.screen_y = screen_pt.y; | 623 ipc_params.screen_y = screen_pt.y; |
624 ipc_params.link_url = params.link_url; | 624 ipc_params.link_url = params.link_url; |
625 ipc_params.unfiltered_link_url = params.unfiltered_link_url; | 625 ipc_params.unfiltered_link_url = params.unfiltered_link_url; |
626 ipc_params.src_url = params.src_url; | 626 ipc_params.src_url = params.src_url; |
627 ipc_params.page_url = params.page_url; | 627 ipc_params.page_url = params.page_url; |
628 ipc_params.frame_url = params.frame_url; | 628 ipc_params.frame_url = params.frame_url; |
629 | 629 |
630 bool rtl = base::i18n::IsRTL(); | 630 bool rtl = base::i18n::IsRTL(); |
631 automation_->Send( | 631 automation_->Send( |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 | 1104 |
1105 if (disposition == CURRENT_TAB) { | 1105 if (disposition == CURRENT_TAB) { |
1106 DCHECK(route_all_top_level_navigations_); | 1106 DCHECK(route_all_top_level_navigations_); |
1107 disposition = NEW_FOREGROUND_TAB; | 1107 disposition = NEW_FOREGROUND_TAB; |
1108 } | 1108 } |
1109 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, | 1109 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, |
1110 transition); | 1110 transition); |
1111 // support only one navigation for a dummy tab before it is killed. | 1111 // support only one navigation for a dummy tab before it is killed. |
1112 ::DestroyWindow(GetNativeView()); | 1112 ::DestroyWindow(GetNativeView()); |
1113 } | 1113 } |
OLD | NEW |