| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "chrome/common/url_constants.h" | 42 #include "chrome/common/url_constants.h" |
| 43 #include "content/browser/load_notification_details.h" | 43 #include "content/browser/load_notification_details.h" |
| 44 #include "content/browser/renderer_host/render_view_host.h" | 44 #include "content/browser/renderer_host/render_view_host.h" |
| 45 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 45 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| 46 #include "content/browser/tab_contents/provisional_load_details.h" | 46 #include "content/browser/tab_contents/provisional_load_details.h" |
| 47 #include "content/public/browser/navigation_details.h" | 47 #include "content/public/browser/navigation_details.h" |
| 48 #include "content/public/browser/navigation_entry.h" | 48 #include "content/public/browser/navigation_entry.h" |
| 49 #include "content/public/browser/native_web_keyboard_event.h" | 49 #include "content/public/browser/native_web_keyboard_event.h" |
| 50 #include "content/public/browser/notification_service.h" | 50 #include "content/public/browser/notification_service.h" |
| 51 #include "content/public/browser/render_process_host.h" | 51 #include "content/public/browser/render_process_host.h" |
| 52 #include "content/public/browser/ssl_status.h" | |
| 53 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
| 54 #include "content/public/browser/web_intents_dispatcher.h" | 53 #include "content/public/browser/web_intents_dispatcher.h" |
| 55 #include "content/public/common/bindings_policy.h" | 54 #include "content/public/common/bindings_policy.h" |
| 56 #include "content/public/common/frame_navigate_params.h" | 55 #include "content/public/common/frame_navigate_params.h" |
| 57 #include "content/public/common/page_transition_types.h" | 56 #include "content/public/common/page_transition_types.h" |
| 58 #include "content/public/common/page_zoom.h" | 57 #include "content/public/common/page_zoom.h" |
| 59 #include "content/public/common/renderer_preferences.h" | 58 #include "content/public/common/renderer_preferences.h" |
| 59 #include "content/public/common/ssl_status.h" |
| 60 #include "grit/generated_resources.h" | 60 #include "grit/generated_resources.h" |
| 61 #include "grit/locale_settings.h" | 61 #include "grit/locale_settings.h" |
| 62 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 62 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
| 63 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 63 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h" | 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h" |
| 65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 66 #include "ui/base/l10n/l10n_util.h" | 66 #include "ui/base/l10n/l10n_util.h" |
| 67 #include "ui/base/models/menu_model.h" | 67 #include "ui/base/models/menu_model.h" |
| 68 #include "ui/base/view_prop.h" | 68 #include "ui/base/view_prop.h" |
| 69 #include "ui/views/layout/grid_layout.h" | 69 #include "ui/views/layout/grid_layout.h" |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 render_view_host->process()->GetID(), | 611 render_view_host->process()->GetID(), |
| 612 render_view_host->routing_id()); | 612 render_view_host->routing_id()); |
| 613 } | 613 } |
| 614 } | 614 } |
| 615 | 615 |
| 616 content::JavaScriptDialogCreator* | 616 content::JavaScriptDialogCreator* |
| 617 ExternalTabContainer::GetJavaScriptDialogCreator() { | 617 ExternalTabContainer::GetJavaScriptDialogCreator() { |
| 618 return GetJavaScriptDialogCreatorInstance(); | 618 return GetJavaScriptDialogCreatorInstance(); |
| 619 } | 619 } |
| 620 | 620 |
| 621 bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) { | 621 bool ExternalTabContainer::HandleContextMenu( |
| 622 const content::ContextMenuParams& params) { |
| 622 if (!automation_) { | 623 if (!automation_) { |
| 623 NOTREACHED(); | 624 NOTREACHED(); |
| 624 return false; | 625 return false; |
| 625 } | 626 } |
| 626 external_context_menu_.reset( | 627 external_context_menu_.reset( |
| 627 new RenderViewContextMenuViews(web_contents(), params)); | 628 new RenderViewContextMenuViews(web_contents(), params)); |
| 628 external_context_menu_->SetExternal(); | 629 external_context_menu_->SetExternal(); |
| 629 external_context_menu_->Init(); | 630 external_context_menu_->Init(); |
| 630 external_context_menu_->UpdateMenuItemStates(); | 631 external_context_menu_->UpdateMenuItemStates(); |
| 631 | 632 |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 if (params.disposition == CURRENT_TAB) { | 1203 if (params.disposition == CURRENT_TAB) { |
| 1203 DCHECK(route_all_top_level_navigations_); | 1204 DCHECK(route_all_top_level_navigations_); |
| 1204 forward_params.disposition = NEW_FOREGROUND_TAB; | 1205 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1205 } | 1206 } |
| 1206 WebContents* new_contents = | 1207 WebContents* new_contents = |
| 1207 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1208 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
| 1208 // 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. |
| 1209 ::DestroyWindow(GetNativeView()); | 1210 ::DestroyWindow(GetNativeView()); |
| 1210 return new_contents; | 1211 return new_contents; |
| 1211 } | 1212 } |
| OLD | NEW |