| 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/ui/views/external_tab_container_win.h" | 5 #include "chrome/browser/ui/views/external_tab_container_win.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlapp.h> | 8 #include <atlapp.h> |
| 9 #include <atlconv.h> | 9 #include <atlconv.h> |
| 10 #include <atlmisc.h> | 10 #include <atlmisc.h> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "chrome/browser/ui/browser_tab_contents.h" | 40 #include "chrome/browser/ui/browser_tab_contents.h" |
| 41 #include "chrome/browser/ui/browser_window.h" | 41 #include "chrome/browser/ui/browser_window.h" |
| 42 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 42 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 43 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 43 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 44 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_win.h" | 44 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_win.h" |
| 45 #include "chrome/common/automation_messages.h" | 45 #include "chrome/common/automation_messages.h" |
| 46 #include "chrome/common/chrome_constants.h" | 46 #include "chrome/common/chrome_constants.h" |
| 47 #include "chrome/common/chrome_notification_types.h" | 47 #include "chrome/common/chrome_notification_types.h" |
| 48 #include "chrome/common/render_messages.h" | 48 #include "chrome/common/render_messages.h" |
| 49 #include "chrome/common/url_constants.h" | 49 #include "chrome/common/url_constants.h" |
| 50 #include "content/public/browser/color_chooser.h" |
| 50 #include "content/public/browser/load_notification_details.h" | 51 #include "content/public/browser/load_notification_details.h" |
| 51 #include "content/public/browser/native_web_keyboard_event.h" | 52 #include "content/public/browser/native_web_keyboard_event.h" |
| 52 #include "content/public/browser/navigation_details.h" | 53 #include "content/public/browser/navigation_details.h" |
| 53 #include "content/public/browser/navigation_entry.h" | 54 #include "content/public/browser/navigation_entry.h" |
| 54 #include "content/public/browser/notification_service.h" | 55 #include "content/public/browser/notification_service.h" |
| 55 #include "content/public/browser/render_process_host.h" | 56 #include "content/public/browser/render_process_host.h" |
| 56 #include "content/public/browser/render_view_host.h" | 57 #include "content/public/browser/render_view_host.h" |
| 57 #include "content/public/browser/web_contents.h" | 58 #include "content/public/browser/web_contents.h" |
| 58 #include "content/public/browser/web_contents_view.h" | 59 #include "content/public/browser/web_contents_view.h" |
| 59 #include "content/public/common/bindings_policy.h" | 60 #include "content/public/common/bindings_policy.h" |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 unload_reply_message_ = NULL; | 813 unload_reply_message_ = NULL; |
| 813 *proceed_to_fire_unload = false; | 814 *proceed_to_fire_unload = false; |
| 814 } | 815 } |
| 815 } | 816 } |
| 816 | 817 |
| 817 void ExternalTabContainerWin::ShowRepostFormWarningDialog(WebContents* source) { | 818 void ExternalTabContainerWin::ShowRepostFormWarningDialog(WebContents* source) { |
| 818 TabModalConfirmDialog::Create(new RepostFormWarningController(source), | 819 TabModalConfirmDialog::Create(new RepostFormWarningController(source), |
| 819 source); | 820 source); |
| 820 } | 821 } |
| 821 | 822 |
| 823 content::ColorChooser* ExternalTabContainerWin::OpenColorChooser( |
| 824 WebContents* web_contents, SkColor initial_color) { |
| 825 return content::ColorChooser::Open(web_contents, initial_color); |
| 826 } |
| 827 |
| 822 void ExternalTabContainerWin::RunFileChooser( | 828 void ExternalTabContainerWin::RunFileChooser( |
| 823 WebContents* tab, | 829 WebContents* tab, |
| 824 const content::FileChooserParams& params) { | 830 const content::FileChooserParams& params) { |
| 825 FileSelectHelper::RunFileChooser(tab, params); | 831 FileSelectHelper::RunFileChooser(tab, params); |
| 826 } | 832 } |
| 827 | 833 |
| 828 void ExternalTabContainerWin::EnumerateDirectory(WebContents* tab, | 834 void ExternalTabContainerWin::EnumerateDirectory(WebContents* tab, |
| 829 int request_id, | 835 int request_id, |
| 830 const base::FilePath& path) { | 836 const base::FilePath& path) { |
| 831 FileSelectHelper::EnumerateDirectory(tab, request_id, path); | 837 FileSelectHelper::EnumerateDirectory(tab, request_id, path); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 if (params.disposition == CURRENT_TAB) { | 1301 if (params.disposition == CURRENT_TAB) { |
| 1296 DCHECK(route_all_top_level_navigations_); | 1302 DCHECK(route_all_top_level_navigations_); |
| 1297 forward_params.disposition = NEW_FOREGROUND_TAB; | 1303 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1298 } | 1304 } |
| 1299 WebContents* new_contents = | 1305 WebContents* new_contents = |
| 1300 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); | 1306 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); |
| 1301 // support only one navigation for a dummy tab before it is killed. | 1307 // support only one navigation for a dummy tab before it is killed. |
| 1302 widget_->CloseNow(); | 1308 widget_->CloseNow(); |
| 1303 return new_contents; | 1309 return new_contents; |
| 1304 } | 1310 } |
| OLD | NEW |