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