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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 return true; | 323 return true; |
324 #else | 324 #else |
325 return false; | 325 return false; |
326 #endif | 326 #endif |
327 } | 327 } |
328 | 328 |
329 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) { | 329 void Shell::DidNavigateMainFramePostCommit(WebContents* web_contents) { |
330 PlatformSetAddressBarURL(web_contents->GetLastCommittedURL()); | 330 PlatformSetAddressBarURL(web_contents->GetLastCommittedURL()); |
331 } | 331 } |
332 | 332 |
333 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { | 333 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager( |
| 334 WebContents* source) { |
334 if (!dialog_manager_) { | 335 if (!dialog_manager_) { |
335 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 336 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
336 dialog_manager_.reset(command_line.HasSwitch(switches::kDumpRenderTree) | 337 dialog_manager_.reset(command_line.HasSwitch(switches::kDumpRenderTree) |
337 ? new LayoutTestJavaScriptDialogManager | 338 ? new LayoutTestJavaScriptDialogManager |
338 : new ShellJavaScriptDialogManager); | 339 : new ShellJavaScriptDialogManager); |
339 } | 340 } |
340 return dialog_manager_.get(); | 341 return dialog_manager_.get(); |
341 } | 342 } |
342 | 343 |
343 bool Shell::AddMessageToConsole(WebContents* source, | 344 bool Shell::AddMessageToConsole(WebContents* source, |
(...skipping 56 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 |