| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager( | 402 JavaScriptDialogManager* Shell::GetJavaScriptDialogManager( |
| 403 WebContents* source) { | 403 WebContents* source) { |
| 404 if (!dialog_manager_) { | 404 if (!dialog_manager_) { |
| 405 dialog_manager_.reset(switches::IsRunLayoutTestSwitchPresent() | 405 dialog_manager_.reset(switches::IsRunLayoutTestSwitchPresent() |
| 406 ? new LayoutTestJavaScriptDialogManager | 406 ? new LayoutTestJavaScriptDialogManager |
| 407 : new ShellJavaScriptDialogManager); | 407 : new ShellJavaScriptDialogManager); |
| 408 } | 408 } |
| 409 return dialog_manager_.get(); | 409 return dialog_manager_.get(); |
| 410 } | 410 } |
| 411 | 411 |
| 412 scoped_ptr<BluetoothChooser> Shell::RunBluetoothChooser( | 412 std::unique_ptr<BluetoothChooser> Shell::RunBluetoothChooser( |
| 413 RenderFrameHost* frame, | 413 RenderFrameHost* frame, |
| 414 const BluetoothChooser::EventHandler& event_handler) { | 414 const BluetoothChooser::EventHandler& event_handler) { |
| 415 if (switches::IsRunLayoutTestSwitchPresent()) { | 415 if (switches::IsRunLayoutTestSwitchPresent()) { |
| 416 return BlinkTestController::Get()->RunBluetoothChooser(frame, | 416 return BlinkTestController::Get()->RunBluetoothChooser(frame, |
| 417 event_handler); | 417 event_handler); |
| 418 } | 418 } |
| 419 return nullptr; | 419 return nullptr; |
| 420 } | 420 } |
| 421 | 421 |
| 422 bool Shell::AddMessageToConsole(WebContents* source, | 422 bool Shell::AddMessageToConsole(WebContents* source, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 devtools_frontend_->Activate(); | 479 devtools_frontend_->Activate(); |
| 480 devtools_frontend_->Focus(); | 480 devtools_frontend_->Focus(); |
| 481 } | 481 } |
| 482 | 482 |
| 483 void Shell::OnDevToolsWebContentsDestroyed() { | 483 void Shell::OnDevToolsWebContentsDestroyed() { |
| 484 devtools_observer_.reset(); | 484 devtools_observer_.reset(); |
| 485 devtools_frontend_ = NULL; | 485 devtools_frontend_ = NULL; |
| 486 } | 486 } |
| 487 | 487 |
| 488 } // namespace content | 488 } // namespace content |
| OLD | NEW |