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

Side by Side Diff: chrome/browser/background/background_contents_service.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/background/background_contents_service.h" 5 #include "chrome/browser/background/background_contents_service.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 if (contents == it->second.contents) 605 if (contents == it->second.contents)
606 return it->first; 606 return it->first;
607 } 607 }
608 return EmptyString16(); 608 return EmptyString16();
609 } 609 }
610 610
611 void BackgroundContentsService::AddWebContents( 611 void BackgroundContentsService::AddWebContents(
612 WebContents* new_contents, 612 WebContents* new_contents,
613 WindowOpenDisposition disposition, 613 WindowOpenDisposition disposition,
614 const gfx::Rect& initial_pos, 614 const gfx::Rect& initial_pos,
615 bool user_gesture) { 615 bool user_gesture,
616 bool* was_blocked) {
616 Browser* browser = browser::FindLastActiveWithProfile( 617 Browser* browser = browser::FindLastActiveWithProfile(
617 Profile::FromBrowserContext(new_contents->GetBrowserContext())); 618 Profile::FromBrowserContext(new_contents->GetBrowserContext()));
618 if (browser) { 619 if (browser) {
619 chrome::AddWebContents(browser, NULL, new_contents, disposition, 620 chrome::AddWebContents(browser, NULL, new_contents, disposition,
620 initial_pos, user_gesture); 621 initial_pos, user_gesture, was_blocked);
621 } 622 }
622 } 623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698