| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 if (!dialog_manager_) { | 446 if (!dialog_manager_) { |
| 447 dialog_manager_.reset(switches::IsRunLayoutTestSwitchPresent() | 447 dialog_manager_.reset(switches::IsRunLayoutTestSwitchPresent() |
| 448 ? new LayoutTestJavaScriptDialogManager | 448 ? new LayoutTestJavaScriptDialogManager |
| 449 : new ShellJavaScriptDialogManager); | 449 : new ShellJavaScriptDialogManager); |
| 450 } | 450 } |
| 451 return dialog_manager_.get(); | 451 return dialog_manager_.get(); |
| 452 } | 452 } |
| 453 | 453 |
| 454 std::unique_ptr<BluetoothChooser> Shell::RunBluetoothChooser( | 454 std::unique_ptr<BluetoothChooser> Shell::RunBluetoothChooser( |
| 455 RenderFrameHost* frame, | 455 RenderFrameHost* frame, |
| 456 const BluetoothChooser::EventHandler& event_handler) { | 456 const BluetoothChooser::EventHandler& event_handler, |
| 457 bool accept_all_devices) { |
| 457 if (switches::IsRunLayoutTestSwitchPresent()) { | 458 if (switches::IsRunLayoutTestSwitchPresent()) { |
| 458 return BlinkTestController::Get()->RunBluetoothChooser(frame, | 459 return BlinkTestController::Get()->RunBluetoothChooser(frame, event_handler, |
| 459 event_handler); | 460 accept_all_devices); |
| 460 } | 461 } |
| 461 return nullptr; | 462 return nullptr; |
| 462 } | 463 } |
| 463 | 464 |
| 464 bool Shell::DidAddMessageToConsole(WebContents* source, | 465 bool Shell::DidAddMessageToConsole(WebContents* source, |
| 465 int32_t level, | 466 int32_t level, |
| 466 const base::string16& message, | 467 const base::string16& message, |
| 467 int32_t line_no, | 468 int32_t line_no, |
| 468 const base::string16& source_id) { | 469 const base::string16& source_id) { |
| 469 return switches::IsRunLayoutTestSwitchPresent(); | 470 return switches::IsRunLayoutTestSwitchPresent(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 if (entry) | 503 if (entry) |
| 503 PlatformSetTitle(entry->GetTitle()); | 504 PlatformSetTitle(entry->GetTitle()); |
| 504 } | 505 } |
| 505 | 506 |
| 506 void Shell::OnDevToolsWebContentsDestroyed() { | 507 void Shell::OnDevToolsWebContentsDestroyed() { |
| 507 devtools_observer_.reset(); | 508 devtools_observer_.reset(); |
| 508 devtools_frontend_ = NULL; | 509 devtools_frontend_ = NULL; |
| 509 } | 510 } |
| 510 | 511 |
| 511 } // namespace content | 512 } // namespace content |
| OLD | NEW |