OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell.h" | 5 #include "content/shell/browser/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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 shell->LoadURL(url); | 164 shell->LoadURL(url); |
165 return shell; | 165 return shell; |
166 } | 166 } |
167 | 167 |
168 void Shell::LoadURL(const GURL& url) { | 168 void Shell::LoadURL(const GURL& url) { |
169 LoadURLForFrame(url, std::string()); | 169 LoadURLForFrame(url, std::string()); |
170 } | 170 } |
171 | 171 |
172 void Shell::LoadURLForFrame(const GURL& url, const std::string& frame_name) { | 172 void Shell::LoadURLForFrame(const GURL& url, const std::string& frame_name) { |
173 NavigationController::LoadURLParams params(url); | 173 NavigationController::LoadURLParams params(url); |
174 params.transition_type = PageTransitionFromInt( | 174 params.transition_type = ui::PageTransitionFromInt( |
175 PAGE_TRANSITION_TYPED | PAGE_TRANSITION_FROM_ADDRESS_BAR); | 175 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); |
176 params.frame_name = frame_name; | 176 params.frame_name = frame_name; |
177 web_contents_->GetController().LoadURLWithParams(params); | 177 web_contents_->GetController().LoadURLWithParams(params); |
178 web_contents_->Focus(); | 178 web_contents_->Focus(); |
179 } | 179 } |
180 | 180 |
181 void Shell::LoadDataWithBaseURL(const GURL& url, const std::string& data, | 181 void Shell::LoadDataWithBaseURL(const GURL& url, const std::string& data, |
182 const GURL& base_url) { | 182 const GURL& base_url) { |
183 const GURL data_url = GURL("data:text/html;charset=utf-8," + data); | 183 const GURL data_url = GURL("data:text/html;charset=utf-8," + data); |
184 NavigationController::LoadURLParams params(data_url); | 184 NavigationController::LoadURLParams params(data_url); |
185 params.load_type = NavigationController::LOAD_TYPE_DATA; | 185 params.load_type = NavigationController::LOAD_TYPE_DATA; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 devtools_frontend_->Activate(); | 389 devtools_frontend_->Activate(); |
390 devtools_frontend_->Focus(); | 390 devtools_frontend_->Focus(); |
391 } | 391 } |
392 | 392 |
393 void Shell::OnDevToolsWebContentsDestroyed() { | 393 void Shell::OnDevToolsWebContentsDestroyed() { |
394 devtools_observer_.reset(); | 394 devtools_observer_.reset(); |
395 devtools_frontend_ = NULL; | 395 devtools_frontend_ = NULL; |
396 } | 396 } |
397 | 397 |
398 } // namespace content | 398 } // namespace content |
OLD | NEW |