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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase 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
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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2292 } 2292 }
2293 // Save the created window associated with the route so we can show it 2293 // Save the created window associated with the route so we can show it
2294 // later. 2294 // later.
2295 DCHECK_NE(MSG_ROUTING_NONE, main_frame_widget_route_id); 2295 DCHECK_NE(MSG_ROUTING_NONE, main_frame_widget_route_id);
2296 pending_contents_[std::make_pair( 2296 pending_contents_[std::make_pair(
2297 render_process_id, main_frame_widget_route_id)] = new_contents; 2297 render_process_id, main_frame_widget_route_id)] = new_contents;
2298 AddDestructionObserver(new_contents); 2298 AddDestructionObserver(new_contents);
2299 } 2299 }
2300 2300
2301 if (delegate_) { 2301 if (delegate_) {
2302 delegate_->WebContentsCreated(this, render_process_id, 2302 delegate_->WebContentsCreated(
2303 opener->GetRoutingID(), params.frame_name, 2303 this, render_process_id, opener->GetRoutingID(), params.frame_name,
2304 params.target_url, new_contents); 2304 params.target_url, new_contents, create_params);
2305 } 2305 }
2306 2306
2307 if (opener) { 2307 if (opener) {
2308 for (auto& observer : observers_) { 2308 for (auto& observer : observers_) {
2309 observer.DidOpenRequestedURL(new_contents, opener, params.target_url, 2309 observer.DidOpenRequestedURL(new_contents, opener, params.target_url,
2310 params.referrer, params.disposition, 2310 params.referrer, params.disposition,
2311 ui::PAGE_TRANSITION_LINK, 2311 ui::PAGE_TRANSITION_LINK,
2312 false, // started_from_context_menu 2312 false, // started_from_context_menu
2313 true); // renderer_initiated 2313 true); // renderer_initiated
2314 } 2314 }
(...skipping 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after
5660 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); 5660 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host);
5661 if (!render_view_host) 5661 if (!render_view_host)
5662 continue; 5662 continue;
5663 render_view_host_set.insert(render_view_host); 5663 render_view_host_set.insert(render_view_host);
5664 } 5664 }
5665 for (RenderViewHost* render_view_host : render_view_host_set) 5665 for (RenderViewHost* render_view_host : render_view_host_set)
5666 render_view_host->OnWebkitPreferencesChanged(); 5666 render_view_host->OnWebkitPreferencesChanged();
5667 } 5667 }
5668 5668
5669 } // namespace content 5669 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698