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

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

Issue 691823002: Add WebContents source to methods in WebContentsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « content/shell/browser/shell.h ('k') | extensions/browser/app_window/app_window.h » ('j') | 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/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 return true; 322 return true;
323 #else 323 #else
324 return false; 324 return false;
325 #endif 325 #endif
326 } 326 }
327 327
328 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) { 328 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) {
329 PlatformSetAddressBarURL(web_contents->GetLastCommittedURL()); 329 PlatformSetAddressBarURL(web_contents->GetLastCommittedURL());
330 } 330 }
331 331
332 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { 332 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(
333 WebContents* source) {
333 if (!dialog_manager_) { 334 if (!dialog_manager_) {
334 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 335 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
335 dialog_manager_.reset(command_line.HasSwitch(switches::kDumpRenderTree) 336 dialog_manager_.reset(command_line.HasSwitch(switches::kDumpRenderTree)
336 ? new LayoutTestJavaScriptDialogManager 337 ? new LayoutTestJavaScriptDialogManager
337 : new ShellJavaScriptDialogManager); 338 : new ShellJavaScriptDialogManager);
338 } 339 }
339 return dialog_manager_.get(); 340 return dialog_manager_.get();
340 } 341 }
341 342
342 bool Shell::AddMessageToConsole(WebContents* source, 343 bool Shell::AddMessageToConsole(WebContents* source,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 devtools_frontend_->Activate(); 400 devtools_frontend_->Activate();
400 devtools_frontend_->Focus(); 401 devtools_frontend_->Focus();
401 } 402 }
402 403
403 void Shell::OnDevToolsWebContentsDestroyed() { 404 void Shell::OnDevToolsWebContentsDestroyed() {
404 devtools_observer_.reset(); 405 devtools_observer_.reset();
405 devtools_frontend_ = NULL; 406 devtools_frontend_ = NULL;
406 } 407 }
407 408
408 } // namespace content 409 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell.h ('k') | extensions/browser/app_window/app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698