| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 NOTREACHED(); | 178 NOTREACHED(); |
| 179 return false; | 179 return false; |
| 180 } | 180 } |
| 181 | 181 |
| 182 // TODO(jcampan): limit focus traversal to contents. | 182 // TODO(jcampan): limit focus traversal to contents. |
| 183 | 183 |
| 184 prop_.reset(new ViewProp(GetNativeView(), kWindowObjectKey, this)); | 184 prop_.reset(new ViewProp(GetNativeView(), kWindowObjectKey, this)); |
| 185 | 185 |
| 186 if (existing_contents) { | 186 if (existing_contents) { |
| 187 tab_contents_.reset(existing_contents); | 187 tab_contents_.reset(existing_contents); |
| 188 tab_contents_->controller().set_profile(profile); | 188 tab_contents_->controller().set_context(profile); |
| 189 } else { | 189 } else { |
| 190 TabContents* new_contents = new TabContents(profile, NULL, MSG_ROUTING_NONE, | 190 TabContents* new_contents = new TabContents(profile, NULL, MSG_ROUTING_NONE, |
| 191 NULL, NULL); | 191 NULL, NULL); |
| 192 tab_contents_.reset(new TabContentsWrapper(new_contents)); | 192 tab_contents_.reset(new TabContentsWrapper(new_contents)); |
| 193 } | 193 } |
| 194 | 194 |
| 195 if (!infobars_enabled) | 195 if (!infobars_enabled) |
| 196 tab_contents_->set_infobars_enabled(false); | 196 tab_contents_->set_infobars_enabled(false); |
| 197 | 197 |
| 198 tab_contents_->tab_contents()->set_delegate(this); | 198 tab_contents_->tab_contents()->set_delegate(this); |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 | 1146 |
| 1147 if (disposition == CURRENT_TAB) { | 1147 if (disposition == CURRENT_TAB) { |
| 1148 DCHECK(route_all_top_level_navigations_); | 1148 DCHECK(route_all_top_level_navigations_); |
| 1149 disposition = NEW_FOREGROUND_TAB; | 1149 disposition = NEW_FOREGROUND_TAB; |
| 1150 } | 1150 } |
| 1151 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, | 1151 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, |
| 1152 transition); | 1152 transition); |
| 1153 // support only one navigation for a dummy tab before it is killed. | 1153 // support only one navigation for a dummy tab before it is killed. |
| 1154 ::DestroyWindow(GetNativeView()); | 1154 ::DestroyWindow(GetNativeView()); |
| 1155 } | 1155 } |
| OLD | NEW |