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

Side by Side Diff: chrome/browser/ui/gtk/web_dialog_gtk.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/gtk/web_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/web_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 delegate_->HandleOpenURLFromTab(source, params, &new_contents)) { 158 delegate_->HandleOpenURLFromTab(source, params, &new_contents)) {
159 return new_contents; 159 return new_contents;
160 } 160 }
161 return WebDialogWebContentsDelegate::OpenURLFromTab(source, params); 161 return WebDialogWebContentsDelegate::OpenURLFromTab(source, params);
162 } 162 }
163 163
164 void WebDialogGtk::AddNewContents(content::WebContents* source, 164 void WebDialogGtk::AddNewContents(content::WebContents* source,
165 content::WebContents* new_contents, 165 content::WebContents* new_contents,
166 WindowOpenDisposition disposition, 166 WindowOpenDisposition disposition,
167 const gfx::Rect& initial_pos, 167 const gfx::Rect& initial_pos,
168 bool user_gesture) { 168 bool user_gesture,
169 bool* was_blocked) {
169 if (delegate_ && delegate_->HandleAddNewContents( 170 if (delegate_ && delegate_->HandleAddNewContents(
170 source, new_contents, disposition, initial_pos, user_gesture)) { 171 source, new_contents, disposition, initial_pos, user_gesture)) {
171 return; 172 return;
172 } 173 }
173 WebDialogWebContentsDelegate::AddNewContents( 174 WebDialogWebContentsDelegate::AddNewContents(
174 source, new_contents, disposition, initial_pos, user_gesture); 175 source, new_contents, disposition, initial_pos, user_gesture,
176 was_blocked);
175 } 177 }
176 178
177 void WebDialogGtk::LoadingStateChanged(content::WebContents* source) { 179 void WebDialogGtk::LoadingStateChanged(content::WebContents* source) {
178 if (delegate_) 180 if (delegate_)
179 delegate_->OnLoadingStateChanged(source); 181 delegate_->OnLoadingStateChanged(source);
180 } 182 }
181 183
182 bool WebDialogGtk::ShouldShowDialogTitle() const { 184 bool WebDialogGtk::ShouldShowDialogTitle() const {
183 return true; 185 return true;
184 } 186 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 256 }
255 257
256 gtk_widget_show_all(dialog_); 258 gtk_widget_show_all(dialog_);
257 259
258 return GTK_WINDOW(dialog_); 260 return GTK_WINDOW(dialog_);
259 } 261 }
260 262
261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 263 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
262 OnDialogClosed(std::string()); 264 OnDialogClosed(std::string());
263 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698