Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 4200007: Refactor automation messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome_frame no longer depends on tab_contents.h Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_uitest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/page_info_window.h" 22 #include "chrome/browser/page_info_window.h"
23 #include "chrome/browser/profile.h" 23 #include "chrome/browser/profile.h"
24 #include "chrome/browser/renderer_host/render_process_host.h" 24 #include "chrome/browser/renderer_host/render_process_host.h"
25 #include "chrome/browser/renderer_host/render_view_host.h" 25 #include "chrome/browser/renderer_host/render_view_host.h"
26 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" 26 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h"
27 #include "chrome/browser/tab_contents/provisional_load_details.h" 27 #include "chrome/browser/tab_contents/provisional_load_details.h"
28 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" 28 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h"
29 #include "chrome/browser/tab_contents/tab_contents.h" 29 #include "chrome/browser/tab_contents/tab_contents.h"
30 #include "chrome/browser/views/page_info_bubble_view.h" 30 #include "chrome/browser/views/page_info_bubble_view.h"
31 #include "chrome/browser/views/tab_contents/tab_contents_container.h" 31 #include "chrome/browser/views/tab_contents/tab_contents_container.h"
32 #include "chrome/common/automation_messages.h"
32 #include "chrome/common/bindings_policy.h" 33 #include "chrome/common/bindings_policy.h"
33 #include "chrome/common/chrome_constants.h" 34 #include "chrome/common/chrome_constants.h"
34 #include "chrome/common/render_messages.h" 35 #include "chrome/common/render_messages.h"
35 #include "chrome/common/render_messages_params.h" 36 #include "chrome/common/render_messages_params.h"
36 #include "chrome/common/native_web_keyboard_event.h" 37 #include "chrome/common/native_web_keyboard_event.h"
37 #include "chrome/common/notification_service.h" 38 #include "chrome/common/notification_service.h"
38 #include "chrome/common/page_transition_types.h" 39 #include "chrome/common/page_transition_types.h"
39 #include "chrome/test/automation/automation_messages.h"
40 #include "grit/generated_resources.h" 40 #include "grit/generated_resources.h"
41 #include "grit/locale_settings.h" 41 #include "grit/locale_settings.h"
42 #include "views/grid_layout.h" 42 #include "views/grid_layout.h"
43 #include "views/widget/root_view.h" 43 #include "views/widget/root_view.h"
44 #include "views/window/window.h" 44 #include "views/window/window.h"
45 45
46 static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject"; 46 static const wchar_t kWindowObjectKey[] = L"ChromeWindowObject";
47 47
48 // This class overrides the LinkActivated function in the PageInfoBubbleView 48 // This class overrides the LinkActivated function in the PageInfoBubbleView
49 // class and routes the help center link navigation to the host browser. 49 // class and routes the help center link navigation to the host browser.
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::ContextMenuParams ipc_params; 621 IPC::MiniContextMenuParams 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 1103
1104 if (disposition == CURRENT_TAB) { 1104 if (disposition == CURRENT_TAB) {
1105 DCHECK(route_all_top_level_navigations_); 1105 DCHECK(route_all_top_level_navigations_);
1106 disposition = NEW_FOREGROUND_TAB; 1106 disposition = NEW_FOREGROUND_TAB;
1107 } 1107 }
1108 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, 1108 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition,
1109 transition); 1109 transition);
1110 // support only one navigation for a dummy tab before it is killed. 1110 // support only one navigation for a dummy tab before it is killed.
1111 ::DestroyWindow(GetNativeView()); 1111 ::DestroyWindow(GetNativeView());
1112 } 1112 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_uitest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698