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

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

Issue 2206963002: Plumb the frame name through the popup blocker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 #endif 2153 #endif
2154 } 2154 }
2155 2155
2156 bool ChromeContentBrowserClient::CanCreateWindow( 2156 bool ChromeContentBrowserClient::CanCreateWindow(
2157 const GURL& opener_url, 2157 const GURL& opener_url,
2158 const GURL& opener_top_level_frame_url, 2158 const GURL& opener_top_level_frame_url,
2159 const GURL& source_origin, 2159 const GURL& source_origin,
2160 WindowContainerType container_type, 2160 WindowContainerType container_type,
2161 const GURL& target_url, 2161 const GURL& target_url,
2162 const content::Referrer& referrer, 2162 const content::Referrer& referrer,
2163 const std::string& frame_name,
2163 WindowOpenDisposition disposition, 2164 WindowOpenDisposition disposition,
2164 const WebWindowFeatures& features, 2165 const WebWindowFeatures& features,
2165 bool user_gesture, 2166 bool user_gesture,
2166 bool opener_suppressed, 2167 bool opener_suppressed,
2167 content::ResourceContext* context, 2168 content::ResourceContext* context,
2168 int render_process_id, 2169 int render_process_id,
2169 int opener_render_view_id, 2170 int opener_render_view_id,
2170 int opener_render_frame_id, 2171 int opener_render_frame_id,
2171 bool* no_javascript_access) { 2172 bool* no_javascript_access) {
2172 DCHECK_CURRENTLY_ON(BrowserThread::IO); 2173 DCHECK_CURRENTLY_ON(BrowserThread::IO);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLoadedInTab", source, 2231 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLoadedInTab", source,
2231 APP_LOADED_IN_TAB_SOURCE_MAX); 2232 APP_LOADED_IN_TAB_SOURCE_MAX);
2232 } 2233 }
2233 } 2234 }
2234 #endif 2235 #endif
2235 2236
2236 HostContentSettingsMap* content_settings = 2237 HostContentSettingsMap* content_settings =
2237 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); 2238 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap();
2238 BlockedWindowParams blocked_params(target_url, 2239 BlockedWindowParams blocked_params(target_url,
2239 referrer, 2240 referrer,
2241 frame_name,
2240 disposition, 2242 disposition,
2241 features, 2243 features,
2242 user_gesture, 2244 user_gesture,
2243 opener_suppressed, 2245 opener_suppressed,
2244 render_process_id, 2246 render_process_id,
2245 opener_render_frame_id); 2247 opener_render_frame_id);
2246 2248
2247 if (!user_gesture && 2249 if (!user_gesture &&
2248 !base::CommandLine::ForCurrentProcess()->HasSwitch( 2250 !base::CommandLine::ForCurrentProcess()->HasSwitch(
2249 switches::kDisablePopupBlocking)) { 2251 switches::kDisablePopupBlocking)) {
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 if (channel <= kMaxDisableEncryptionChannel) { 3062 if (channel <= kMaxDisableEncryptionChannel) {
3061 static const char* const kWebRtcDevSwitchNames[] = { 3063 static const char* const kWebRtcDevSwitchNames[] = {
3062 switches::kDisableWebRtcEncryption, 3064 switches::kDisableWebRtcEncryption,
3063 }; 3065 };
3064 to_command_line->CopySwitchesFrom(from_command_line, 3066 to_command_line->CopySwitchesFrom(from_command_line,
3065 kWebRtcDevSwitchNames, 3067 kWebRtcDevSwitchNames,
3066 arraysize(kWebRtcDevSwitchNames)); 3068 arraysize(kWebRtcDevSwitchNames));
3067 } 3069 }
3068 } 3070 }
3069 #endif // defined(ENABLE_WEBRTC) 3071 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/ui/blocked_content/blocked_window_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698