Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: content/shell/browser/shell.cc

Issue 23517003: content_shell: avoid debug crashing for mid-clicks on links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 gfx::NativeView Shell::GetContentView() { 225 gfx::NativeView Shell::GetContentView() {
226 if (!web_contents_) 226 if (!web_contents_)
227 return NULL; 227 return NULL;
228 return web_contents_->GetView()->GetNativeView(); 228 return web_contents_->GetView()->GetNativeView();
229 } 229 }
230 230
231 WebContents* Shell::OpenURLFromTab(WebContents* source, 231 WebContents* Shell::OpenURLFromTab(WebContents* source,
232 const OpenURLParams& params) { 232 const OpenURLParams& params) {
233 // The only one we implement for now. 233 // CURRENT_TAB is the only one we implement for now.
234 DCHECK(params.disposition == CURRENT_TAB); 234 if (params.disposition != CURRENT_TAB)
235 return NULL;
235 NavigationController::LoadURLParams load_url_params(params.url); 236 NavigationController::LoadURLParams load_url_params(params.url);
236 load_url_params.referrer = params.referrer; 237 load_url_params.referrer = params.referrer;
237 load_url_params.transition_type = params.transition; 238 load_url_params.transition_type = params.transition;
238 load_url_params.extra_headers = params.extra_headers; 239 load_url_params.extra_headers = params.extra_headers;
239 load_url_params.should_replace_current_entry = 240 load_url_params.should_replace_current_entry =
240 params.should_replace_current_entry; 241 params.should_replace_current_entry;
241 242
242 if (params.transferred_global_request_id != GlobalRequestID()) { 243 if (params.transferred_global_request_id != GlobalRequestID()) {
243 load_url_params.is_renderer_initiated = params.is_renderer_initiated; 244 load_url_params.is_renderer_initiated = params.is_renderer_initiated;
244 load_url_params.transferred_global_request_id = 245 load_url_params.transferred_global_request_id =
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 NOTREACHED(); 359 NOTREACHED();
359 } 360 }
360 } 361 }
361 362
362 void Shell::OnDevToolsWebContentsDestroyed() { 363 void Shell::OnDevToolsWebContentsDestroyed() {
363 devtools_observer_.reset(); 364 devtools_observer_.reset();
364 devtools_frontend_ = NULL; 365 devtools_frontend_ = NULL;
365 } 366 }
366 367
367 } // namespace content 368 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698