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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 Shell* Shell::CreateNewWindow(BrowserContext* browser_context, | 104 Shell* Shell::CreateNewWindow(BrowserContext* browser_context, |
105 const GURL& url, | 105 const GURL& url, |
106 SiteInstance* site_instance, | 106 SiteInstance* site_instance, |
107 int routing_id, | 107 int routing_id, |
108 WebContents* base_web_contents) { | 108 WebContents* base_web_contents) { |
109 WebContents* web_contents = WebContents::Create( | 109 WebContents* web_contents = WebContents::Create( |
110 browser_context, | 110 browser_context, |
111 site_instance, | 111 site_instance, |
112 routing_id, | 112 routing_id, |
113 base_web_contents, | 113 base_web_contents); |
114 NULL); | |
115 Shell* shell = CreateShell(web_contents); | 114 Shell* shell = CreateShell(web_contents); |
116 if (!url.is_empty()) | 115 if (!url.is_empty()) |
117 shell->LoadURL(url); | 116 shell->LoadURL(url); |
118 return shell; | 117 return shell; |
119 } | 118 } |
120 | 119 |
121 void Shell::LoadURL(const GURL& url) { | 120 void Shell::LoadURL(const GURL& url) { |
122 web_contents_->GetController().LoadURL( | 121 web_contents_->GetController().LoadURL( |
123 url, | 122 url, |
124 Referrer(), | 123 Referrer(), |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 Details<std::pair<NavigationEntry*, bool> >(details).ptr(); | 214 Details<std::pair<NavigationEntry*, bool> >(details).ptr(); |
216 | 215 |
217 if (title->first) { | 216 if (title->first) { |
218 string16 text = title->first->GetTitle(); | 217 string16 text = title->first->GetTitle(); |
219 PlatformSetTitle(text); | 218 PlatformSetTitle(text); |
220 } | 219 } |
221 } | 220 } |
222 } | 221 } |
223 | 222 |
224 } // namespace content | 223 } // namespace content |
OLD | NEW |