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

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, 7 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 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 } 2284 }
2285 // Save the created window associated with the route so we can show it 2285 // Save the created window associated with the route so we can show it
2286 // later. 2286 // later.
2287 DCHECK_NE(MSG_ROUTING_NONE, main_frame_widget_route_id); 2287 DCHECK_NE(MSG_ROUTING_NONE, main_frame_widget_route_id);
2288 pending_contents_[std::make_pair( 2288 pending_contents_[std::make_pair(
2289 render_process_id, main_frame_widget_route_id)] = new_contents; 2289 render_process_id, main_frame_widget_route_id)] = new_contents;
2290 AddDestructionObserver(new_contents); 2290 AddDestructionObserver(new_contents);
2291 } 2291 }
2292 2292
2293 if (delegate_) { 2293 if (delegate_) {
2294 delegate_->WebContentsCreated(this, render_process_id, 2294 delegate_->WebContentsCreated(
2295 opener->GetRoutingID(), params.frame_name, 2295 this, render_process_id, opener->GetRoutingID(), params.frame_name,
2296 params.target_url, new_contents); 2296 params.target_url, new_contents, create_params);
2297 } 2297 }
2298 2298
2299 if (opener) { 2299 if (opener) {
2300 for (auto& observer : observers_) { 2300 for (auto& observer : observers_) {
2301 observer.DidOpenRequestedURL(new_contents, opener, params.target_url, 2301 observer.DidOpenRequestedURL(new_contents, opener, params.target_url,
2302 params.referrer, params.disposition, 2302 params.referrer, params.disposition,
2303 ui::PAGE_TRANSITION_LINK, 2303 ui::PAGE_TRANSITION_LINK,
2304 false, // started_from_context_menu 2304 false, // started_from_context_menu
2305 true); // renderer_initiated 2305 true); // renderer_initiated
2306 } 2306 }
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after
5638 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); 5638 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host);
5639 if (!render_view_host) 5639 if (!render_view_host)
5640 continue; 5640 continue;
5641 render_view_host_set.insert(render_view_host); 5641 render_view_host_set.insert(render_view_host);
5642 } 5642 }
5643 for (RenderViewHost* render_view_host : render_view_host_set) 5643 for (RenderViewHost* render_view_host : render_view_host_set)
5644 render_view_host->OnWebkitPreferencesChanged(); 5644 render_view_host->OnWebkitPreferencesChanged();
5645 } 5645 }
5646 5646
5647 } // namespace content 5647 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698