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

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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 content::WebContents* source, 154 content::WebContents* source,
155 const content::OpenURLParams& params) { 155 const content::OpenURLParams& params) {
156 content::WebContents* new_contents = NULL; 156 content::WebContents* new_contents = NULL;
157 if (delegate_ && 157 if (delegate_ &&
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 bool 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 if (delegate_ && delegate_->HandleAddNewContents( 169 if (delegate_ && delegate_->HandleAddNewContents(
170 source, new_contents, disposition, initial_pos, user_gesture)) { 170 source, new_contents, disposition, initial_pos, user_gesture)) {
171 return; 171 return true;
172 } 172 }
173 WebDialogWebContentsDelegate::AddNewContents( 173 return WebDialogWebContentsDelegate::AddNewContents(
174 source, new_contents, disposition, initial_pos, user_gesture); 174 source, new_contents, disposition, initial_pos, user_gesture);
175 } 175 }
176 176
177 void WebDialogGtk::LoadingStateChanged(content::WebContents* source) { 177 void WebDialogGtk::LoadingStateChanged(content::WebContents* source) {
178 if (delegate_) 178 if (delegate_)
179 delegate_->OnLoadingStateChanged(source); 179 delegate_->OnLoadingStateChanged(source);
180 } 180 }
181 181
182 bool WebDialogGtk::ShouldShowDialogTitle() const { 182 bool WebDialogGtk::ShouldShowDialogTitle() const {
183 return true; 183 return true;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 gtk_widget_show_all(dialog_); 256 gtk_widget_show_all(dialog_);
257 257
258 return GTK_WINDOW(dialog_); 258 return GTK_WINDOW(dialog_);
259 } 259 }
260 260
261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
262 OnDialogClosed(std::string()); 262 OnDialogClosed(std::string());
263 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698