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

Side by Side Diff: ui/views/controls/webview/web_dialog_view.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 "ui/views/controls/webview/web_dialog_view.h" 5 #include "ui/views/controls/webview/web_dialog_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 delegate_->HandleOpenURLFromTab(source, params, &new_contents)) { 274 delegate_->HandleOpenURLFromTab(source, params, &new_contents)) {
275 return new_contents; 275 return new_contents;
276 } 276 }
277 return WebDialogWebContentsDelegate::OpenURLFromTab(source, params); 277 return WebDialogWebContentsDelegate::OpenURLFromTab(source, params);
278 } 278 }
279 279
280 void WebDialogView::AddNewContents(content::WebContents* source, 280 void WebDialogView::AddNewContents(content::WebContents* source,
281 content::WebContents* new_contents, 281 content::WebContents* new_contents,
282 WindowOpenDisposition disposition, 282 WindowOpenDisposition disposition,
283 const gfx::Rect& initial_pos, 283 const gfx::Rect& initial_pos,
284 bool user_gesture) { 284 bool user_gesture,
285 bool* was_blocked) {
285 if (delegate_ && delegate_->HandleAddNewContents( 286 if (delegate_ && delegate_->HandleAddNewContents(
286 source, new_contents, disposition, initial_pos, user_gesture)) { 287 source, new_contents, disposition, initial_pos, user_gesture)) {
287 return; 288 return;
288 } 289 }
289 WebDialogWebContentsDelegate::AddNewContents( 290 WebDialogWebContentsDelegate::AddNewContents(
290 source, new_contents, disposition, initial_pos, user_gesture); 291 source, new_contents, disposition, initial_pos, user_gesture,
292 was_blocked);
291 } 293 }
292 294
293 void WebDialogView::LoadingStateChanged(content::WebContents* source) { 295 void WebDialogView::LoadingStateChanged(content::WebContents* source) {
294 if (delegate_) 296 if (delegate_)
295 delegate_->OnLoadingStateChanged(source); 297 delegate_->OnLoadingStateChanged(source);
296 } 298 }
297 299
298 //////////////////////////////////////////////////////////////////////////////// 300 ////////////////////////////////////////////////////////////////////////////////
299 // WebDialogView, private: 301 // WebDialogView, private:
300 302
(...skipping 12 matching lines...) Expand all
313 gfx::Size out; 315 gfx::Size out;
314 delegate_->GetDialogSize(&out); 316 delegate_->GetDialogSize(&out);
315 if (!out.IsEmpty() && GetWidget()) 317 if (!out.IsEmpty() && GetWidget())
316 GetWidget()->CenterWindow(out); 318 GetWidget()->CenterWindow(out);
317 } 319 }
318 320
319 web_view_->LoadInitialURL(GetDialogContentURL()); 321 web_view_->LoadInitialURL(GetDialogContentURL());
320 } 322 }
321 323
322 } // namespace views 324 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698