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

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

Issue 10696158: Rename WasRestored to WasShown across all uses. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Bring to ToT to commit Created 8 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/ui/blocked_content/blocked_content_container.h" 5 #include "chrome/browser/ui/blocked_content/blocked_content_container.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 8 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 for (BlockedContents::iterator i(blocked_contents_.begin()); 66 for (BlockedContents::iterator i(blocked_contents_.begin());
67 i != blocked_contents_.end(); ++i) { 67 i != blocked_contents_.end(); ++i) {
68 if (i->tab_contents == tab_contents) { 68 if (i->tab_contents == tab_contents) {
69 // To support the owner blocking the content again we copy and erase 69 // To support the owner blocking the content again we copy and erase
70 // before attempting to add. 70 // before attempting to add.
71 BlockedContent content(*i); 71 BlockedContent content(*i);
72 blocked_contents_.erase(i); 72 blocked_contents_.erase(i);
73 i = blocked_contents_.end(); 73 i = blocked_contents_.end();
74 tab_contents->web_contents()->SetDelegate(NULL); 74 tab_contents->web_contents()->SetDelegate(NULL);
75 tab_contents->blocked_content_tab_helper()->set_delegate(NULL); 75 tab_contents->blocked_content_tab_helper()->set_delegate(NULL);
76 // We needn't call WasRestored to change its status because the 76 // We needn't call WasShown to change its status because the
77 // WebContents::AddNewContents will do it. 77 // WebContents::AddNewContents will do it.
78 owner_->web_contents()->AddNewContents( 78 owner_->web_contents()->AddNewContents(
79 tab_contents->web_contents(), 79 tab_contents->web_contents(),
80 content.disposition, 80 content.disposition,
81 content.bounds, 81 content.bounds,
82 content.user_gesture); 82 content.user_gesture);
83 break; 83 break;
84 } 84 }
85 } 85 }
86 } 86 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 bool BlockedContentContainer::ShouldSuppressDialogs() { 160 bool BlockedContentContainer::ShouldSuppressDialogs() {
161 // Suppress JavaScript dialogs when inside a constrained popup window (because 161 // Suppress JavaScript dialogs when inside a constrained popup window (because
162 // that activates them and breaks them out of the constrained window jail). 162 // that activates them and breaks them out of the constrained window jail).
163 return true; 163 return true;
164 } 164 }
165 165
166 TabContents* BlockedContentContainer::GetConstrainingTabContents( 166 TabContents* BlockedContentContainer::GetConstrainingTabContents(
167 TabContents* source) { 167 TabContents* source) {
168 return owner_; 168 return owner_;
169 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_loader.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698