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

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

Issue 112573008: Remove call of PrerenderTracker::TryCancelOnIOThread in ChromeContentBrowserClient::CanCreateWindow… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 565 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
566 g_io_thread_application_locale.Get() = locale; 566 g_io_thread_application_locale.Get() = locale;
567 } 567 }
568 568
569 void HandleBlockedPopupOnUIThread(const BlockedWindowParams& params) { 569 void HandleBlockedPopupOnUIThread(const BlockedWindowParams& params) {
570 WebContents* tab = tab_util::GetWebContentsByID(params.render_process_id(), 570 WebContents* tab = tab_util::GetWebContentsByID(params.render_process_id(),
571 params.opener_id()); 571 params.opener_id());
572 if (!tab) 572 if (!tab)
573 return; 573 return;
574 574
575 prerender::PrerenderContents* prerender_contents =
576 prerender::PrerenderContents::FromWebContents(tab);
577 if (prerender_contents) {
578 prerender_contents->Destroy(prerender::FINAL_STATUS_CREATE_NEW_WINDOW);
579 return;
580 }
581
575 PopupBlockerTabHelper* popup_helper = 582 PopupBlockerTabHelper* popup_helper =
576 PopupBlockerTabHelper::FromWebContents(tab); 583 PopupBlockerTabHelper::FromWebContents(tab);
577 if (!popup_helper) 584 if (!popup_helper)
578 return; 585 return;
579 popup_helper->AddBlockedPopup(params); 586 popup_helper->AddBlockedPopup(params);
580 } 587 }
581 588
582 #if defined(OS_ANDROID) 589 #if defined(OS_ANDROID)
583 590
584 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) { 591 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) {
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 2085
2079 return true; 2086 return true;
2080 } 2087 }
2081 2088
2082 // No new browser window (popup or tab) in app mode. 2089 // No new browser window (popup or tab) in app mode.
2083 if (container_type == WINDOW_CONTAINER_TYPE_NORMAL && 2090 if (container_type == WINDOW_CONTAINER_TYPE_NORMAL &&
2084 chrome::IsRunningInForcedAppMode()) { 2091 chrome::IsRunningInForcedAppMode()) {
2085 return false; 2092 return false;
2086 } 2093 }
2087 2094
2088 if (g_browser_process->prerender_tracker() &&
2089 g_browser_process->prerender_tracker()->TryCancelOnIOThread(
2090 render_process_id,
2091 opener_id,
2092 prerender::FINAL_STATUS_CREATE_NEW_WINDOW)) {
2093 return false;
2094 }
2095
2096 if (is_guest) 2095 if (is_guest)
2097 return true; 2096 return true;
2098 2097
2099 HostContentSettingsMap* content_settings = 2098 HostContentSettingsMap* content_settings =
2100 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); 2099 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap();
2101 BlockedWindowParams blocked_params(target_url, 2100 BlockedWindowParams blocked_params(target_url,
2102 referrer, 2101 referrer,
2103 disposition, 2102 disposition,
2104 features, 2103 features,
2105 user_gesture, 2104 user_gesture,
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 2656 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
2658 // Chromium builds as well. 2657 // Chromium builds as well.
2659 return channel <= chrome::VersionInfo::CHANNEL_DEV; 2658 return channel <= chrome::VersionInfo::CHANNEL_DEV;
2660 #else 2659 #else
2661 return false; 2660 return false;
2662 #endif 2661 #endif
2663 } 2662 }
2664 2663
2665 2664
2666 } // namespace chrome 2665 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | chrome/browser/prerender/prerender_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698