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

Side by Side Diff: ui/views/controls/webview/web_dialog_view.cc

Issue 2882513005: Propagate opener to BackgroundsContents. (Closed)
Patch Set: Tweaked the comment in DriveWebContentsManager::ShouldCreateWebContents Created 3 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
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 void WebDialogView::BeforeUnloadFired(content::WebContents* tab, 328 void WebDialogView::BeforeUnloadFired(content::WebContents* tab,
329 bool proceed, 329 bool proceed,
330 bool* proceed_to_fire_unload) { 330 bool* proceed_to_fire_unload) {
331 before_unload_fired_ = true; 331 before_unload_fired_ = true;
332 *proceed_to_fire_unload = proceed; 332 *proceed_to_fire_unload = proceed;
333 } 333 }
334 334
335 bool WebDialogView::ShouldCreateWebContents( 335 bool WebDialogView::ShouldCreateWebContents(
336 content::WebContents* web_contents, 336 content::WebContents* web_contents,
337 content::RenderFrameHost* opener,
337 content::SiteInstance* source_site_instance, 338 content::SiteInstance* source_site_instance,
338 int32_t route_id, 339 int32_t route_id,
339 int32_t main_frame_route_id, 340 int32_t main_frame_route_id,
340 int32_t main_frame_widget_route_id, 341 int32_t main_frame_widget_route_id,
341 content::mojom::WindowContainerType window_container_type, 342 content::mojom::WindowContainerType window_container_type,
342 const GURL& opener_url, 343 const GURL& opener_url,
343 const std::string& frame_name, 344 const std::string& frame_name,
344 const GURL& target_url, 345 const GURL& target_url,
345 const std::string& partition_id, 346 const std::string& partition_id,
346 content::SessionStorageNamespace* session_storage_namespace) { 347 content::SessionStorageNamespace* session_storage_namespace) {
(...skipping 13 matching lines...) Expand all
360 web_contents->SetDelegate(this); 361 web_contents->SetDelegate(this);
361 362
362 // Set the delegate. This must be done before loading the page. See 363 // Set the delegate. This must be done before loading the page. See
363 // the comment above WebDialogUI in its header file for why. 364 // the comment above WebDialogUI in its header file for why.
364 WebDialogUI::SetDelegate(web_contents, this); 365 WebDialogUI::SetDelegate(web_contents, this);
365 366
366 web_view_->LoadInitialURL(GetDialogContentURL()); 367 web_view_->LoadInitialURL(GetDialogContentURL());
367 } 368 }
368 369
369 } // namespace views 370 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698