| OLD | NEW |
| 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/shell/shell.h" | 5 #include "content/shell/shell.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 Shell* Shell::CreateNewWindow(BrowserContext* browser_context, | 109 Shell* Shell::CreateNewWindow(BrowserContext* browser_context, |
| 110 const GURL& url, | 110 const GURL& url, |
| 111 SiteInstance* site_instance, | 111 SiteInstance* site_instance, |
| 112 int routing_id, | 112 int routing_id, |
| 113 WebContents* base_web_contents) { | 113 WebContents* base_web_contents) { |
| 114 WebContents* web_contents = WebContents::Create( | 114 WebContents* web_contents = WebContents::Create( |
| 115 browser_context, | 115 browser_context, |
| 116 site_instance, | 116 site_instance, |
| 117 routing_id, | 117 routing_id, |
| 118 base_web_contents, | 118 base_web_contents); |
| 119 NULL); | |
| 120 Shell* shell = CreateShell(web_contents); | 119 Shell* shell = CreateShell(web_contents); |
| 121 if (!url.is_empty()) | 120 if (!url.is_empty()) |
| 122 shell->LoadURL(url); | 121 shell->LoadURL(url); |
| 123 return shell; | 122 return shell; |
| 124 } | 123 } |
| 125 | 124 |
| 126 void Shell::LoadURL(const GURL& url) { | 125 void Shell::LoadURL(const GURL& url) { |
| 127 web_contents_->GetController().LoadURL( | 126 web_contents_->GetController().LoadURL( |
| 128 url, | 127 url, |
| 129 Referrer(), | 128 Referrer(), |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 Details<std::pair<NavigationEntry*, bool> >(details).ptr(); | 232 Details<std::pair<NavigationEntry*, bool> >(details).ptr(); |
| 234 | 233 |
| 235 if (title->first) { | 234 if (title->first) { |
| 236 string16 text = title->first->GetTitle(); | 235 string16 text = title->first->GetTitle(); |
| 237 PlatformSetTitle(text); | 236 PlatformSetTitle(text); |
| 238 } | 237 } |
| 239 } | 238 } |
| 240 } | 239 } |
| 241 | 240 |
| 242 } // namespace content | 241 } // namespace content |
| OLD | NEW |