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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 years, 4 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 1509
1510 void Browser::WebContentsCreated(WebContents* source_contents, 1510 void Browser::WebContentsCreated(WebContents* source_contents,
1511 int64 source_frame_id, 1511 int64 source_frame_id,
1512 const GURL& target_url, 1512 const GURL& target_url,
1513 WebContents* new_contents) { 1513 WebContents* new_contents) {
1514 // Create a TabContents now, so all observers are in place, as the network 1514 // Create a TabContents now, so all observers are in place, as the network
1515 // requests for its initial navigation will start immediately. The WebContents 1515 // requests for its initial navigation will start immediately. The WebContents
1516 // will later be inserted into this browser using Browser::Navigate via 1516 // will later be inserted into this browser using Browser::Navigate via
1517 // AddNewContents. The latter will retrieve the newly created TabContents from 1517 // AddNewContents. The latter will retrieve the newly created TabContents from
1518 // WebContents object. 1518 // WebContents object.
1519 new TabContents(new_contents); 1519 TabContents::Factory::CreateTabContents(new_contents);
1520 1520
1521 // Notify. 1521 // Notify.
1522 RetargetingDetails details; 1522 RetargetingDetails details;
1523 details.source_web_contents = source_contents; 1523 details.source_web_contents = source_contents;
1524 details.source_frame_id = source_frame_id; 1524 details.source_frame_id = source_frame_id;
1525 details.target_url = target_url; 1525 details.target_url = target_url;
1526 details.target_web_contents = new_contents; 1526 details.target_web_contents = new_contents;
1527 details.not_yet_in_tabstrip = true; 1527 details.not_yet_in_tabstrip = true;
1528 content::NotificationService::current()->Notify( 1528 content::NotificationService::current()->Notify(
1529 chrome::NOTIFICATION_RETARGETING, 1529 chrome::NOTIFICATION_RETARGETING,
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 if (contents && !allow_js_access) { 2308 if (contents && !allow_js_access) {
2309 contents->web_contents()->GetController().LoadURL( 2309 contents->web_contents()->GetController().LoadURL(
2310 target_url, 2310 target_url,
2311 content::Referrer(), 2311 content::Referrer(),
2312 content::PAGE_TRANSITION_LINK, 2312 content::PAGE_TRANSITION_LINK,
2313 std::string()); // No extra headers. 2313 std::string()); // No extra headers.
2314 } 2314 }
2315 2315
2316 return contents != NULL; 2316 return contents != NULL;
2317 } 2317 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698