| 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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 Source<NavigationController>(controller)); | 211 Source<NavigationController>(controller)); |
| 212 registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR, | 212 registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR, |
| 213 Source<NavigationController>(controller)); | 213 Source<NavigationController>(controller)); |
| 214 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, | 214 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, |
| 215 Source<NavigationController>(controller)); | 215 Source<NavigationController>(controller)); |
| 216 registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB, | 216 registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB, |
| 217 Source<TabContents>(tab_contents_->tab_contents())); | 217 Source<TabContents>(tab_contents_->tab_contents())); |
| 218 registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, | 218 registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, |
| 219 NotificationService::AllSources()); | 219 NotificationService::AllSources()); |
| 220 | 220 |
| 221 NotificationService::current()->Notify( | |
| 222 chrome::NOTIFICATION_EXTERNAL_TAB_CREATED, | |
| 223 Source<NavigationController>(controller), | |
| 224 NotificationService::NoDetails()); | |
| 225 | |
| 226 TabContentsObserver::Observe(tab_contents_->tab_contents()); | 221 TabContentsObserver::Observe(tab_contents_->tab_contents()); |
| 227 | 222 |
| 228 // Start loading initial URL | 223 // Start loading initial URL |
| 229 if (!initial_url.is_empty()) { | 224 if (!initial_url.is_empty()) { |
| 230 // Navigate out of context since we don't have a 'tab_handle_' yet. | 225 // Navigate out of context since we don't have a 'tab_handle_' yet. |
| 231 MessageLoop::current()->PostTask( | 226 MessageLoop::current()->PostTask( |
| 232 FROM_HERE, | 227 FROM_HERE, |
| 233 external_method_factory_.NewRunnableMethod( | 228 external_method_factory_.NewRunnableMethod( |
| 234 &ExternalTabContainer::Navigate, initial_url, referrer)); | 229 &ExternalTabContainer::Navigate, initial_url, referrer)); |
| 235 } | 230 } |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 if (params.disposition == CURRENT_TAB) { | 1156 if (params.disposition == CURRENT_TAB) { |
| 1162 DCHECK(route_all_top_level_navigations_); | 1157 DCHECK(route_all_top_level_navigations_); |
| 1163 forward_params.disposition = NEW_FOREGROUND_TAB; | 1158 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1164 } | 1159 } |
| 1165 TabContents* new_contents = | 1160 TabContents* new_contents = |
| 1166 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1161 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
| 1167 // support only one navigation for a dummy tab before it is killed. | 1162 // support only one navigation for a dummy tab before it is killed. |
| 1168 ::DestroyWindow(GetNativeView()); | 1163 ::DestroyWindow(GetNativeView()); |
| 1169 return new_contents; | 1164 return new_contents; |
| 1170 } | 1165 } |
| OLD | NEW |