Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: slight tweaking for comments Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_browser_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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 DCHECK(route_all_top_level_navigations_); 1153 DCHECK(route_all_top_level_navigations_);
1154 disposition = NEW_FOREGROUND_TAB; 1154 disposition = NEW_FOREGROUND_TAB;
1155 } 1155 }
1156 TabContents* new_contents = 1156 TabContents* new_contents =
1157 ExternalTabContainer::OpenURLFromTab( 1157 ExternalTabContainer::OpenURLFromTab(
1158 source, url, referrer, disposition, transition); 1158 source, url, referrer, disposition, transition);
1159 // support only one navigation for a dummy tab before it is killed. 1159 // support only one navigation for a dummy tab before it is killed.
1160 ::DestroyWindow(GetNativeView()); 1160 ::DestroyWindow(GetNativeView());
1161 return new_contents; 1161 return new_contents;
1162 } 1162 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/notifications/balloon_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698