| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #include "chrome/browser/ui/browser_command_controller.h" | 93 #include "chrome/browser/ui/browser_command_controller.h" |
| 94 #include "chrome/browser/ui/browser_commands.h" | 94 #include "chrome/browser/ui/browser_commands.h" |
| 95 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | 95 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" |
| 96 #include "chrome/browser/ui/browser_content_translate_driver_observer.h" | 96 #include "chrome/browser/ui/browser_content_translate_driver_observer.h" |
| 97 #include "chrome/browser/ui/browser_dialogs.h" | 97 #include "chrome/browser/ui/browser_dialogs.h" |
| 98 #include "chrome/browser/ui/browser_finder.h" | 98 #include "chrome/browser/ui/browser_finder.h" |
| 99 #include "chrome/browser/ui/browser_instant_controller.h" | 99 #include "chrome/browser/ui/browser_instant_controller.h" |
| 100 #include "chrome/browser/ui/browser_iterator.h" | 100 #include "chrome/browser/ui/browser_iterator.h" |
| 101 #include "chrome/browser/ui/browser_list.h" | 101 #include "chrome/browser/ui/browser_list.h" |
| 102 #include "chrome/browser/ui/browser_navigator.h" | 102 #include "chrome/browser/ui/browser_navigator.h" |
| 103 #include "chrome/browser/ui/browser_tab_contents.h" | |
| 104 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 103 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
| 105 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" | 104 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h" |
| 106 #include "chrome/browser/ui/browser_tabstrip.h" | 105 #include "chrome/browser/ui/browser_tabstrip.h" |
| 107 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" | 106 #include "chrome/browser/ui/browser_toolbar_model_delegate.h" |
| 108 #include "chrome/browser/ui/browser_ui_prefs.h" | 107 #include "chrome/browser/ui/browser_ui_prefs.h" |
| 109 #include "chrome/browser/ui/browser_window.h" | 108 #include "chrome/browser/ui/browser_window.h" |
| 110 #include "chrome/browser/ui/chrome_pages.h" | 109 #include "chrome/browser/ui/chrome_pages.h" |
| 111 #include "chrome/browser/ui/chrome_select_file_policy.h" | 110 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 112 #include "chrome/browser/ui/fast_unload_controller.h" | 111 #include "chrome/browser/ui/fast_unload_controller.h" |
| 113 #include "chrome/browser/ui/find_bar/find_bar.h" | 112 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 114 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 113 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 115 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 114 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 116 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" | 115 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
| 117 #include "chrome/browser/ui/global_error/global_error.h" | 116 #include "chrome/browser/ui/global_error/global_error.h" |
| 118 #include "chrome/browser/ui/global_error/global_error_service.h" | 117 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 119 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 118 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 120 #include "chrome/browser/ui/media_utils.h" | 119 #include "chrome/browser/ui/media_utils.h" |
| 121 #include "chrome/browser/ui/omnibox/location_bar.h" | 120 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 122 #include "chrome/browser/ui/search/search_delegate.h" | 121 #include "chrome/browser/ui/search/search_delegate.h" |
| 123 #include "chrome/browser/ui/search/search_model.h" | 122 #include "chrome/browser/ui/search/search_model.h" |
| 124 #include "chrome/browser/ui/search/search_tab_helper.h" | 123 #include "chrome/browser/ui/search/search_tab_helper.h" |
| 125 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 124 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
| 126 #include "chrome/browser/ui/singleton_tabs.h" | 125 #include "chrome/browser/ui/singleton_tabs.h" |
| 127 #include "chrome/browser/ui/status_bubble.h" | 126 #include "chrome/browser/ui/status_bubble.h" |
| 128 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h" | 127 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h" |
| 129 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 128 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 129 #include "chrome/browser/ui/tab_helpers.h" |
| 130 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 130 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 131 #include "chrome/browser/ui/tabs/dock_info.h" | 131 #include "chrome/browser/ui/tabs/dock_info.h" |
| 132 #include "chrome/browser/ui/tabs/tab_menu_model.h" | 132 #include "chrome/browser/ui/tabs/tab_menu_model.h" |
| 133 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 133 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 134 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" | 134 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" |
| 135 #include "chrome/browser/ui/unload_controller.h" | 135 #include "chrome/browser/ui/unload_controller.h" |
| 136 #include "chrome/browser/ui/validation_message_bubble.h" | 136 #include "chrome/browser/ui/validation_message_bubble.h" |
| 137 #include "chrome/browser/ui/web_applications/web_app_ui.h" | 137 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
| 138 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 138 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 139 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 139 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1487 | 1487 |
| 1488 void Browser::WebContentsCreated(WebContents* source_contents, | 1488 void Browser::WebContentsCreated(WebContents* source_contents, |
| 1489 int64 source_frame_id, | 1489 int64 source_frame_id, |
| 1490 const base::string16& frame_name, | 1490 const base::string16& frame_name, |
| 1491 const GURL& target_url, | 1491 const GURL& target_url, |
| 1492 WebContents* new_contents) { | 1492 WebContents* new_contents) { |
| 1493 // Adopt the WebContents now, so all observers are in place, as the network | 1493 // Adopt the WebContents now, so all observers are in place, as the network |
| 1494 // requests for its initial navigation will start immediately. The WebContents | 1494 // requests for its initial navigation will start immediately. The WebContents |
| 1495 // will later be inserted into this browser using Browser::Navigate via | 1495 // will later be inserted into this browser using Browser::Navigate via |
| 1496 // AddNewContents. | 1496 // AddNewContents. |
| 1497 BrowserTabContents::AttachTabHelpers(new_contents); | 1497 TabHelpers::AttachTabHelpers(new_contents); |
| 1498 | 1498 |
| 1499 // Notify. | 1499 // Notify. |
| 1500 RetargetingDetails details; | 1500 RetargetingDetails details; |
| 1501 details.source_web_contents = source_contents; | 1501 details.source_web_contents = source_contents; |
| 1502 details.source_frame_id = source_frame_id; | 1502 details.source_frame_id = source_frame_id; |
| 1503 details.target_url = target_url; | 1503 details.target_url = target_url; |
| 1504 details.target_web_contents = new_contents; | 1504 details.target_web_contents = new_contents; |
| 1505 details.not_yet_in_tabstrip = true; | 1505 details.not_yet_in_tabstrip = true; |
| 1506 content::NotificationService::current()->Notify( | 1506 content::NotificationService::current()->Notify( |
| 1507 chrome::NOTIFICATION_RETARGETING, | 1507 chrome::NOTIFICATION_RETARGETING, |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2293 if (contents && !allow_js_access) { | 2293 if (contents && !allow_js_access) { |
| 2294 contents->web_contents()->GetController().LoadURL( | 2294 contents->web_contents()->GetController().LoadURL( |
| 2295 target_url, | 2295 target_url, |
| 2296 content::Referrer(), | 2296 content::Referrer(), |
| 2297 content::PAGE_TRANSITION_LINK, | 2297 content::PAGE_TRANSITION_LINK, |
| 2298 std::string()); // No extra headers. | 2298 std::string()); // No extra headers. |
| 2299 } | 2299 } |
| 2300 | 2300 |
| 2301 return contents != NULL; | 2301 return contents != NULL; |
| 2302 } | 2302 } |
| OLD | NEW |