| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "chrome/common/automation_messages.h" | 35 #include "chrome/common/automation_messages.h" |
| 36 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
| 37 #include "chrome/common/chrome_notification_types.h" | 37 #include "chrome/common/chrome_notification_types.h" |
| 38 #include "chrome/common/render_messages.h" | 38 #include "chrome/common/render_messages.h" |
| 39 #include "chrome/common/url_constants.h" | 39 #include "chrome/common/url_constants.h" |
| 40 #include "content/browser/load_notification_details.h" | 40 #include "content/browser/load_notification_details.h" |
| 41 #include "content/browser/renderer_host/render_view_host.h" | 41 #include "content/browser/renderer_host/render_view_host.h" |
| 42 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 42 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| 43 #include "content/browser/tab_contents/navigation_details.h" | 43 #include "content/browser/tab_contents/navigation_details.h" |
| 44 #include "content/browser/tab_contents/provisional_load_details.h" | 44 #include "content/browser/tab_contents/provisional_load_details.h" |
| 45 #include "content/public/browser/intents_host.h" |
| 45 #include "content/public/browser/native_web_keyboard_event.h" | 46 #include "content/public/browser/native_web_keyboard_event.h" |
| 46 #include "content/public/browser/notification_service.h" | 47 #include "content/public/browser/notification_service.h" |
| 47 #include "content/public/common/bindings_policy.h" | 48 #include "content/public/common/bindings_policy.h" |
| 48 #include "content/public/common/frame_navigate_params.h" | 49 #include "content/public/common/frame_navigate_params.h" |
| 49 #include "content/public/common/page_transition_types.h" | 50 #include "content/public/common/page_transition_types.h" |
| 50 #include "content/public/common/page_zoom.h" | 51 #include "content/public/common/page_zoom.h" |
| 51 #include "grit/generated_resources.h" | 52 #include "grit/generated_resources.h" |
| 52 #include "grit/locale_settings.h" | 53 #include "grit/locale_settings.h" |
| 53 #include "ui/base/l10n/l10n_util.h" | 54 #include "ui/base/l10n/l10n_util.h" |
| 54 #include "ui/base/models/menu_model.h" | 55 #include "ui/base/models/menu_model.h" |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 const string16& type, | 721 const string16& type, |
| 721 const string16& href, | 722 const string16& href, |
| 722 const string16& title, | 723 const string16& title, |
| 723 const string16& disposition) { | 724 const string16& disposition) { |
| 724 Browser::RegisterIntentHandlerHelper( | 725 Browser::RegisterIntentHandlerHelper( |
| 725 tab, action, type, href, title, disposition); | 726 tab, action, type, href, title, disposition); |
| 726 } | 727 } |
| 727 | 728 |
| 728 void ExternalTabContainer::WebIntentDispatch( | 729 void ExternalTabContainer::WebIntentDispatch( |
| 729 TabContents* tab, | 730 TabContents* tab, |
| 730 int routing_id, | 731 content::IntentsHost* intents_host) { |
| 731 const webkit_glue::WebIntentData& intent, | |
| 732 int intent_id) { | |
| 733 // TODO(binji) How do we want to display the WebIntentPicker bubble if there | 732 // TODO(binji) How do we want to display the WebIntentPicker bubble if there |
| 734 // is no BrowserWindow? | 733 // is no BrowserWindow? |
| 734 delete intents_host; |
| 735 } | 735 } |
| 736 | 736 |
| 737 void ExternalTabContainer::FindReply(TabContents* tab, | 737 void ExternalTabContainer::FindReply(TabContents* tab, |
| 738 int request_id, | 738 int request_id, |
| 739 int number_of_matches, | 739 int number_of_matches, |
| 740 const gfx::Rect& selection_rect, | 740 const gfx::Rect& selection_rect, |
| 741 int active_match_ordinal, | 741 int active_match_ordinal, |
| 742 bool final_update) { | 742 bool final_update) { |
| 743 Browser::FindReplyHelper(tab, request_id, number_of_matches, selection_rect, | 743 Browser::FindReplyHelper(tab, request_id, number_of_matches, selection_rect, |
| 744 active_match_ordinal, final_update); | 744 active_match_ordinal, final_update); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 if (params.disposition == CURRENT_TAB) { | 1178 if (params.disposition == CURRENT_TAB) { |
| 1179 DCHECK(route_all_top_level_navigations_); | 1179 DCHECK(route_all_top_level_navigations_); |
| 1180 forward_params.disposition = NEW_FOREGROUND_TAB; | 1180 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1181 } | 1181 } |
| 1182 TabContents* new_contents = | 1182 TabContents* new_contents = |
| 1183 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1183 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
| 1184 // support only one navigation for a dummy tab before it is killed. | 1184 // support only one navigation for a dummy tab before it is killed. |
| 1185 ::DestroyWindow(GetNativeView()); | 1185 ::DestroyWindow(GetNativeView()); |
| 1186 return new_contents; | 1186 return new_contents; |
| 1187 } | 1187 } |
| OLD | NEW |