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

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

Issue 3036038: ChromeFrame currently overrides the request context for intercepting network ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 NotificationType::METRIC_EVENT_DURATION, 1352 NotificationType::METRIC_EVENT_DURATION,
1353 Source<TabContents>(this), 1353 Source<TabContents>(this),
1354 Details<MetricEventDurationDetails>(&details)); 1354 Details<MetricEventDurationDetails>(&details));
1355 } 1355 }
1356 1356
1357 void TabContents::OnCloseStarted() { 1357 void TabContents::OnCloseStarted() {
1358 if (tab_close_start_time_.is_null()) 1358 if (tab_close_start_time_.is_null())
1359 tab_close_start_time_ = base::TimeTicks::Now(); 1359 tab_close_start_time_ = base::TimeTicks::Now();
1360 } 1360 }
1361 1361
1362 void TabContents::set_request_context(URLRequestContextGetter* context) {
1363 request_context_ = context;
1364 }
1365
1366 bool TabContents::ShouldAcceptDragAndDrop() const { 1362 bool TabContents::ShouldAcceptDragAndDrop() const {
1367 #if defined(OS_CHROMEOS) 1363 #if defined(OS_CHROMEOS)
1368 // ChromeOS panels (pop-ups) do not take drag-n-drop. 1364 // ChromeOS panels (pop-ups) do not take drag-n-drop.
1369 // See http://crosbug.com/2413 1365 // See http://crosbug.com/2413
1370 return delegate() && !delegate()->IsPopup(this); 1366 return delegate() && !delegate()->IsPopup(this);
1371 #else 1367 #else
1372 return true; 1368 return true;
1373 #endif 1369 #endif
1374 } 1370 }
1375 1371
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 2963
2968 NavigationEntry* 2964 NavigationEntry*
2969 TabContents::GetLastCommittedNavigationEntryForRenderManager() { 2965 TabContents::GetLastCommittedNavigationEntryForRenderManager() {
2970 return controller_.GetLastCommittedEntry(); 2966 return controller_.GetLastCommittedEntry();
2971 } 2967 }
2972 2968
2973 bool TabContents::CreateRenderViewForRenderManager( 2969 bool TabContents::CreateRenderViewForRenderManager(
2974 RenderViewHost* render_view_host) { 2970 RenderViewHost* render_view_host) {
2975 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host); 2971 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host);
2976 2972
2977 scoped_refptr<URLRequestContextGetter> request_context = request_context_; 2973 if (!render_view_host->CreateRenderView(string16()))
2978 if (!request_context.get())
2979 request_context = profile()->GetRequestContext();
2980
2981 if (!render_view_host->CreateRenderView(request_context, string16()))
2982 return false; 2974 return false;
2983 2975
2984 // Now that the RenderView has been created, we need to tell it its size. 2976 // Now that the RenderView has been created, we need to tell it its size.
2985 rwh_view->SetSize(view_->GetContainerSize()); 2977 rwh_view->SetSize(view_->GetContainerSize());
2986 2978
2987 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(), 2979 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(),
2988 render_view_host); 2980 render_view_host);
2989 return true; 2981 return true;
2990 } 2982 }
2991 2983
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3263 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3255 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3264 } 3256 }
3265 3257
3266 Profile* TabContents::GetProfileForPasswordManager() { 3258 Profile* TabContents::GetProfileForPasswordManager() {
3267 return profile(); 3259 return profile();
3268 } 3260 }
3269 3261
3270 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3262 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3271 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3263 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3272 } 3264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698