OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 void ExternalTabContainer::WebIntentDispatch(TabContents* tab, | 767 void ExternalTabContainer::WebIntentDispatch(TabContents* tab, |
768 int routing_id, | 768 int routing_id, |
769 const string16& action, | 769 const string16& action, |
770 const string16& type, | 770 const string16& type, |
771 const string16& data, | 771 const string16& data, |
772 int intent_id) { | 772 int intent_id) { |
773 Browser::WebIntentDispatchHelper(tab, routing_id, action, type, data, | 773 Browser::WebIntentDispatchHelper(tab, routing_id, action, type, data, |
774 intent_id); | 774 intent_id); |
775 } | 775 } |
776 | 776 |
| 777 void ExternalTabContainer::FindReply(TabContents* tab, |
| 778 int request_id, |
| 779 int number_of_matches, |
| 780 const gfx::Rect& selection_rect, |
| 781 int active_match_ordinal, |
| 782 bool final_update) { |
| 783 Browser::FindReplyHelper(tab, request_id, number_of_matches, selection_rect, |
| 784 active_match_ordinal, final_update); |
| 785 } |
| 786 |
777 bool ExternalTabContainer::OnMessageReceived(const IPC::Message& message) { | 787 bool ExternalTabContainer::OnMessageReceived(const IPC::Message& message) { |
778 bool handled = true; | 788 bool handled = true; |
779 IPC_BEGIN_MESSAGE_MAP(ExternalTabContainer, message) | 789 IPC_BEGIN_MESSAGE_MAP(ExternalTabContainer, message) |
780 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ForwardMessageToExternalHost, | 790 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ForwardMessageToExternalHost, |
781 OnForwardMessageToExternalHost) | 791 OnForwardMessageToExternalHost) |
782 IPC_MESSAGE_UNHANDLED(handled = false) | 792 IPC_MESSAGE_UNHANDLED(handled = false) |
783 IPC_END_MESSAGE_MAP() | 793 IPC_END_MESSAGE_MAP() |
784 return handled; | 794 return handled; |
785 } | 795 } |
786 | 796 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 // Grab a reference here which will be released in OnFinalMessage | 893 // Grab a reference here which will be released in OnFinalMessage |
884 AddRef(); | 894 AddRef(); |
885 } | 895 } |
886 return result; | 896 return result; |
887 } | 897 } |
888 | 898 |
889 void ExternalTabContainer::OnDestroy() { | 899 void ExternalTabContainer::OnDestroy() { |
890 prop_.reset(); | 900 prop_.reset(); |
891 Uninitialize(); | 901 Uninitialize(); |
892 NativeWidgetWin::OnDestroy(); | 902 NativeWidgetWin::OnDestroy(); |
893 if (browser_.get()) { | |
894 ::DestroyWindow(browser_->window()->GetNativeHandle()); | |
895 } | |
896 } | 903 } |
897 | 904 |
898 void ExternalTabContainer::OnFinalMessage(HWND window) { | 905 void ExternalTabContainer::OnFinalMessage(HWND window) { |
899 // Release the reference which we grabbed in WM_CREATE. | 906 // Release the reference which we grabbed in WM_CREATE. |
900 Release(); | 907 Release(); |
901 } | 908 } |
902 | 909 |
903 void ExternalTabContainer::RunUnloadHandlers(IPC::Message* reply_message) { | 910 void ExternalTabContainer::RunUnloadHandlers(IPC::Message* reply_message) { |
904 if (!automation_) { | 911 if (!automation_) { |
905 delete reply_message; | 912 delete reply_message; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 if (params.disposition == CURRENT_TAB) { | 1203 if (params.disposition == CURRENT_TAB) { |
1197 DCHECK(route_all_top_level_navigations_); | 1204 DCHECK(route_all_top_level_navigations_); |
1198 forward_params.disposition = NEW_FOREGROUND_TAB; | 1205 forward_params.disposition = NEW_FOREGROUND_TAB; |
1199 } | 1206 } |
1200 TabContents* new_contents = | 1207 TabContents* new_contents = |
1201 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1208 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
1202 // support only one navigation for a dummy tab before it is killed. | 1209 // support only one navigation for a dummy tab before it is killed. |
1203 ::DestroyWindow(GetNativeView()); | 1210 ::DestroyWindow(GetNativeView()); |
1204 return new_contents; | 1211 return new_contents; |
1205 } | 1212 } |
OLD | NEW |