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

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

Issue 3187013: Merge 54867 - ChromeFrame currently overrides the request context for interce... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 NotificationType::METRIC_EVENT_DURATION, 1348 NotificationType::METRIC_EVENT_DURATION,
1349 Source<TabContents>(this), 1349 Source<TabContents>(this),
1350 Details<MetricEventDurationDetails>(&details)); 1350 Details<MetricEventDurationDetails>(&details));
1351 } 1351 }
1352 1352
1353 void TabContents::OnCloseStarted() { 1353 void TabContents::OnCloseStarted() {
1354 if (tab_close_start_time_.is_null()) 1354 if (tab_close_start_time_.is_null())
1355 tab_close_start_time_ = base::TimeTicks::Now(); 1355 tab_close_start_time_ = base::TimeTicks::Now();
1356 } 1356 }
1357 1357
1358 void TabContents::set_request_context(URLRequestContextGetter* context) {
1359 request_context_ = context;
1360 }
1361
1362 bool TabContents::ShouldAcceptDragAndDrop() const { 1358 bool TabContents::ShouldAcceptDragAndDrop() const {
1363 #if defined(OS_CHROMEOS) 1359 #if defined(OS_CHROMEOS)
1364 // ChromeOS panels (pop-ups) do not take drag-n-drop. 1360 // ChromeOS panels (pop-ups) do not take drag-n-drop.
1365 // See http://crosbug.com/2413 1361 // See http://crosbug.com/2413
1366 return delegate() && !delegate()->IsPopup(const_cast<TabContents*>(this)); 1362 return delegate() && !delegate()->IsPopup(const_cast<TabContents*>(this));
1367 #else 1363 #else
1368 return true; 1364 return true;
1369 #endif 1365 #endif
1370 } 1366 }
1371 1367
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 2955
2960 NavigationEntry* 2956 NavigationEntry*
2961 TabContents::GetLastCommittedNavigationEntryForRenderManager() { 2957 TabContents::GetLastCommittedNavigationEntryForRenderManager() {
2962 return controller_.GetLastCommittedEntry(); 2958 return controller_.GetLastCommittedEntry();
2963 } 2959 }
2964 2960
2965 bool TabContents::CreateRenderViewForRenderManager( 2961 bool TabContents::CreateRenderViewForRenderManager(
2966 RenderViewHost* render_view_host) { 2962 RenderViewHost* render_view_host) {
2967 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host); 2963 RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host);
2968 2964
2969 scoped_refptr<URLRequestContextGetter> request_context = request_context_; 2965 if (!render_view_host->CreateRenderView(string16()))
2970 if (!request_context.get())
2971 request_context = profile()->GetRequestContext();
2972
2973 if (!render_view_host->CreateRenderView(request_context, string16()))
2974 return false; 2966 return false;
2975 2967
2976 // Now that the RenderView has been created, we need to tell it its size. 2968 // Now that the RenderView has been created, we need to tell it its size.
2977 rwh_view->SetSize(view_->GetContainerSize()); 2969 rwh_view->SetSize(view_->GetContainerSize());
2978 2970
2979 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(), 2971 UpdateMaxPageIDIfNecessary(render_view_host->site_instance(),
2980 render_view_host); 2972 render_view_host);
2981 return true; 2973 return true;
2982 } 2974 }
2983 2975
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3247 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3256 } 3248 }
3257 3249
3258 Profile* TabContents::GetProfileForPasswordManager() { 3250 Profile* TabContents::GetProfileForPasswordManager() {
3259 return profile(); 3251 return profile();
3260 } 3252 }
3261 3253
3262 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3254 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3263 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3255 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3264 } 3256 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/tab_contents/test_tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698