| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } | 316 } |
| 317 | 317 |
| 318 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { | 318 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { |
| 319 if (!dialog_manager_) | 319 if (!dialog_manager_) |
| 320 dialog_manager_.reset(new ShellJavaScriptDialogManager()); | 320 dialog_manager_.reset(new ShellJavaScriptDialogManager()); |
| 321 return dialog_manager_.get(); | 321 return dialog_manager_.get(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 bool Shell::AddMessageToConsole(WebContents* source, | 324 bool Shell::AddMessageToConsole(WebContents* source, |
| 325 int32 level, | 325 int32 level, |
| 326 const string16& message, | 326 const base::string16& message, |
| 327 int32 line_no, | 327 int32 line_no, |
| 328 const string16& source_id) { | 328 const base::string16& source_id) { |
| 329 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree); | 329 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void Shell::RendererUnresponsive(WebContents* source) { | 332 void Shell::RendererUnresponsive(WebContents* source) { |
| 333 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 333 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
| 334 return; | 334 return; |
| 335 WebKitTestController::Get()->RendererUnresponsive(); | 335 WebKitTestController::Get()->RendererUnresponsive(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void Shell::ActivateContents(WebContents* contents) { | 338 void Shell::ActivateContents(WebContents* contents) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 353 if (entry) | 353 if (entry) |
| 354 PlatformSetTitle(entry->GetTitle()); | 354 PlatformSetTitle(entry->GetTitle()); |
| 355 } | 355 } |
| 356 | 356 |
| 357 void Shell::OnDevToolsWebContentsDestroyed() { | 357 void Shell::OnDevToolsWebContentsDestroyed() { |
| 358 devtools_observer_.reset(); | 358 devtools_observer_.reset(); |
| 359 devtools_frontend_ = NULL; | 359 devtools_frontend_ = NULL; |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace content | 362 } // namespace content |
| OLD | NEW |