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

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

Issue 7096016: Remove JS dialog dependency from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now a tc delegate Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 7 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
9 #include "content/browser/tab_contents/tab_contents.h" 9 #include "content/browser/tab_contents/tab_contents.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 } 157 }
158 158
159 bool BlockedContentContainer::IsPopup(const TabContents* source) const { 159 bool BlockedContentContainer::IsPopup(const TabContents* source) const {
160 // Assume everything added is a popup. This may turn out to be wrong, but 160 // Assume everything added is a popup. This may turn out to be wrong, but
161 // callers don't cache this information so it should be fine if the value ends 161 // callers don't cache this information so it should be fine if the value ends
162 // up changing. 162 // up changing.
163 return true; 163 return true;
164 } 164 }
165 165
166 bool BlockedContentContainer::ShouldSuppressDialogs() {
167 // Suppress JavaScript dialogs when inside a constrained popup window (because
168 // that activates them and breaks them out of the constrained window jail).
169 return true;
170 }
171
166 TabContents* BlockedContentContainer::GetConstrainingContents( 172 TabContents* BlockedContentContainer::GetConstrainingContents(
167 TabContents* source) { 173 TabContents* source) {
168 return owner_->tab_contents(); 174 return owner_->tab_contents();
169 } 175 }
170 176
171 TabContentsWrapper* BlockedContentContainer::GetConstrainingContentsWrapper( 177 TabContentsWrapper* BlockedContentContainer::GetConstrainingContentsWrapper(
172 TabContentsWrapper* source) { 178 TabContentsWrapper* source) {
173 return owner_; 179 return owner_;
174 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698