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

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

Issue 2693573002: Remove unused WebWindowFeatures from popup blocker, reducing WebString use in browser (Closed)
Patch Set: Created 3 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 popup_blocker_helper = PopupBlockerTabHelper::FromWebContents(source); 1398 popup_blocker_helper = PopupBlockerTabHelper::FromWebContents(source);
1399 1399
1400 if (popup_blocker_helper) { 1400 if (popup_blocker_helper) {
1401 if ((params.disposition == WindowOpenDisposition::NEW_POPUP || 1401 if ((params.disposition == WindowOpenDisposition::NEW_POPUP ||
1402 params.disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB || 1402 params.disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB ||
1403 params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB || 1403 params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB ||
1404 params.disposition == WindowOpenDisposition::NEW_WINDOW) && 1404 params.disposition == WindowOpenDisposition::NEW_WINDOW) &&
1405 !params.user_gesture && 1405 !params.user_gesture &&
1406 !base::CommandLine::ForCurrentProcess()->HasSwitch( 1406 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1407 switches::kDisablePopupBlocking)) { 1407 switches::kDisablePopupBlocking)) {
1408 if (popup_blocker_helper->MaybeBlockPopup(nav_params, 1408 if (popup_blocker_helper->MaybeBlockPopup(nav_params)) {
1409 WebWindowFeatures())) {
1410 return NULL; 1409 return NULL;
1411 } 1410 }
1412 } 1411 }
1413 } 1412 }
1414 1413
1415 chrome::Navigate(&nav_params); 1414 chrome::Navigate(&nav_params);
1416 1415
1417 return nav_params.target_contents; 1416 return nav_params.target_contents;
1418 } 1417 }
1419 1418
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2620 // new window later, thus we need to navigate the window now. 2619 // new window later, thus we need to navigate the window now.
2621 if (contents) { 2620 if (contents) {
2622 contents->web_contents()->GetController().LoadURL( 2621 contents->web_contents()->GetController().LoadURL(
2623 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, 2622 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK,
2624 std::string()); // No extra headers. 2623 std::string()); // No extra headers.
2625 } 2624 }
2626 } 2625 }
2627 2626
2628 return contents != NULL; 2627 return contents != NULL;
2629 } 2628 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698