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

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

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 1294
1295 // We can synchronously update commands since they will only change once per 1295 // We can synchronously update commands since they will only change once per
1296 // navigation, so we don't have to worry about flickering. We do, however, 1296 // navigation, so we don't have to worry about flickering. We do, however,
1297 // need to update the command state early on load to always present usable 1297 // need to update the command state early on load to always present usable
1298 // actions in the face of slow-to-commit pages. 1298 // actions in the face of slow-to-commit pages.
1299 if (changed_flags & (content::INVALIDATE_TYPE_URL | 1299 if (changed_flags & (content::INVALIDATE_TYPE_URL |
1300 content::INVALIDATE_TYPE_LOAD)) 1300 content::INVALIDATE_TYPE_LOAD))
1301 command_controller_->TabStateChanged(); 1301 command_controller_->TabStateChanged();
1302 } 1302 }
1303 1303
1304 void Browser::AddNewContents(WebContents* source, 1304 bool Browser::AddNewContents(WebContents* source,
1305 WebContents* new_contents, 1305 WebContents* new_contents,
1306 WindowOpenDisposition disposition, 1306 WindowOpenDisposition disposition,
1307 const gfx::Rect& initial_pos, 1307 const gfx::Rect& initial_pos,
1308 bool user_gesture) { 1308 bool user_gesture) {
1309 chrome::AddWebContents(this, source, new_contents, disposition, initial_pos, 1309 return chrome::AddWebContents(
1310 user_gesture); 1310 this, source, new_contents, disposition, initial_pos, user_gesture);
1311 } 1311 }
1312 1312
1313 void Browser::ActivateContents(WebContents* contents) { 1313 void Browser::ActivateContents(WebContents* contents) {
1314 chrome::ActivateTabAt(this, tab_strip_model_->GetIndexOfWebContents(contents), 1314 chrome::ActivateTabAt(this, tab_strip_model_->GetIndexOfWebContents(contents),
1315 false); 1315 false);
1316 window_->Activate(); 1316 window_->Activate();
1317 } 1317 }
1318 1318
1319 void Browser::DeactivateContents(WebContents* contents) { 1319 void Browser::DeactivateContents(WebContents* contents) {
1320 window_->Deactivate(); 1320 window_->Deactivate();
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2295 if (contents && !allow_js_access) { 2295 if (contents && !allow_js_access) {
2296 contents->web_contents()->GetController().LoadURL( 2296 contents->web_contents()->GetController().LoadURL(
2297 target_url, 2297 target_url,
2298 content::Referrer(), 2298 content::Referrer(),
2299 content::PAGE_TRANSITION_LINK, 2299 content::PAGE_TRANSITION_LINK,
2300 std::string()); // No extra headers. 2300 std::string()); // No extra headers.
2301 } 2301 }
2302 2302
2303 return contents != NULL; 2303 return contents != NULL;
2304 } 2304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698