| 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 25 matching lines...) Expand all Loading... |
| 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/browser/tab_contents/tab_contents.h" | 45 #include "content/browser/tab_contents/tab_contents.h" |
| 46 #include "content/public/browser/intents_host.h" | 46 #include "content/public/browser/web_intents_dispatcher.h" |
| 47 #include "content/public/browser/native_web_keyboard_event.h" | 47 #include "content/public/browser/native_web_keyboard_event.h" |
| 48 #include "content/public/browser/notification_service.h" | 48 #include "content/public/browser/notification_service.h" |
| 49 #include "content/public/common/bindings_policy.h" | 49 #include "content/public/common/bindings_policy.h" |
| 50 #include "content/public/common/frame_navigate_params.h" | 50 #include "content/public/common/frame_navigate_params.h" |
| 51 #include "content/public/common/page_transition_types.h" | 51 #include "content/public/common/page_transition_types.h" |
| 52 #include "content/public/common/page_zoom.h" | 52 #include "content/public/common/page_zoom.h" |
| 53 #include "grit/generated_resources.h" | 53 #include "grit/generated_resources.h" |
| 54 #include "grit/locale_settings.h" | 54 #include "grit/locale_settings.h" |
| 55 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 55 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
| 56 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 56 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 const string16& type, | 725 const string16& type, |
| 726 const string16& href, | 726 const string16& href, |
| 727 const string16& title, | 727 const string16& title, |
| 728 const string16& disposition) { | 728 const string16& disposition) { |
| 729 Browser::RegisterIntentHandlerHelper( | 729 Browser::RegisterIntentHandlerHelper( |
| 730 tab, action, type, href, title, disposition); | 730 tab, action, type, href, title, disposition); |
| 731 } | 731 } |
| 732 | 732 |
| 733 void ExternalTabContainer::WebIntentDispatch( | 733 void ExternalTabContainer::WebIntentDispatch( |
| 734 TabContents* tab, | 734 TabContents* tab, |
| 735 content::IntentsHost* intents_host) { | 735 content::WebIntentsDispatcher* intents_dispatcher) { |
| 736 // TODO(binji) How do we want to display the WebIntentPicker bubble if there | 736 // TODO(binji) How do we want to display the WebIntentPicker bubble if there |
| 737 // is no BrowserWindow? | 737 // is no BrowserWindow? |
| 738 delete intents_host; | 738 delete intents_dispatcher; |
| 739 } | 739 } |
| 740 | 740 |
| 741 void ExternalTabContainer::FindReply(TabContents* tab, | 741 void ExternalTabContainer::FindReply(TabContents* tab, |
| 742 int request_id, | 742 int request_id, |
| 743 int number_of_matches, | 743 int number_of_matches, |
| 744 const gfx::Rect& selection_rect, | 744 const gfx::Rect& selection_rect, |
| 745 int active_match_ordinal, | 745 int active_match_ordinal, |
| 746 bool final_update) { | 746 bool final_update) { |
| 747 Browser::FindReplyHelper(tab, request_id, number_of_matches, selection_rect, | 747 Browser::FindReplyHelper(tab, request_id, number_of_matches, selection_rect, |
| 748 active_match_ordinal, final_update); | 748 active_match_ordinal, final_update); |
| (...skipping 429 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 |