| 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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 return NULL; | 254 return NULL; |
| 255 return web_contents_->GetNativeView(); | 255 return web_contents_->GetNativeView(); |
| 256 } | 256 } |
| 257 | 257 |
| 258 WebContents* Shell::OpenURLFromTab(WebContents* source, | 258 WebContents* Shell::OpenURLFromTab(WebContents* source, |
| 259 const OpenURLParams& params) { | 259 const OpenURLParams& params) { |
| 260 // CURRENT_TAB is the only one we implement for now. | 260 // CURRENT_TAB is the only one we implement for now. |
| 261 if (params.disposition != CURRENT_TAB) | 261 if (params.disposition != CURRENT_TAB) |
| 262 return NULL; | 262 return NULL; |
| 263 NavigationController::LoadURLParams load_url_params(params.url); | 263 NavigationController::LoadURLParams load_url_params(params.url); |
| 264 load_url_params.source_site_instance = params.source_site_instance; |
| 264 load_url_params.referrer = params.referrer; | 265 load_url_params.referrer = params.referrer; |
| 265 load_url_params.frame_tree_node_id = params.frame_tree_node_id; | 266 load_url_params.frame_tree_node_id = params.frame_tree_node_id; |
| 266 load_url_params.transition_type = params.transition; | 267 load_url_params.transition_type = params.transition; |
| 267 load_url_params.extra_headers = params.extra_headers; | 268 load_url_params.extra_headers = params.extra_headers; |
| 268 load_url_params.should_replace_current_entry = | 269 load_url_params.should_replace_current_entry = |
| 269 params.should_replace_current_entry; | 270 params.should_replace_current_entry; |
| 270 | 271 |
| 271 if (params.transferred_global_request_id != GlobalRequestID()) { | 272 if (params.transferred_global_request_id != GlobalRequestID()) { |
| 272 load_url_params.is_renderer_initiated = params.is_renderer_initiated; | 273 load_url_params.is_renderer_initiated = params.is_renderer_initiated; |
| 273 load_url_params.transferred_global_request_id = | 274 load_url_params.transferred_global_request_id = |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 devtools_frontend_->Activate(); | 401 devtools_frontend_->Activate(); |
| 401 devtools_frontend_->Focus(); | 402 devtools_frontend_->Focus(); |
| 402 } | 403 } |
| 403 | 404 |
| 404 void Shell::OnDevToolsWebContentsDestroyed() { | 405 void Shell::OnDevToolsWebContentsDestroyed() { |
| 405 devtools_observer_.reset(); | 406 devtools_observer_.reset(); |
| 406 devtools_frontend_ = NULL; | 407 devtools_frontend_ = NULL; |
| 407 } | 408 } |
| 408 | 409 |
| 409 } // namespace content | 410 } // namespace content |
| OLD | NEW |