| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 dialog_manager_.reset(command_line.HasSwitch(switches::kRunLayoutTest) | 375 dialog_manager_.reset(command_line.HasSwitch(switches::kRunLayoutTest) |
| 376 ? new LayoutTestJavaScriptDialogManager | 376 ? new LayoutTestJavaScriptDialogManager |
| 377 : new ShellJavaScriptDialogManager); | 377 : new ShellJavaScriptDialogManager); |
| 378 } | 378 } |
| 379 return dialog_manager_.get(); | 379 return dialog_manager_.get(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 scoped_ptr<BluetoothChooser> Shell::RunBluetoothChooser( | 382 scoped_ptr<BluetoothChooser> Shell::RunBluetoothChooser( |
| 383 WebContents* web_contents, | 383 WebContents* web_contents, |
| 384 const BluetoothChooser::EventHandler& event_handler, | 384 const BluetoothChooser::EventHandler& event_handler, |
| 385 const GURL& origin) { | 385 const url::Origin& origin) { |
| 386 const base::CommandLine& command_line = | 386 const base::CommandLine& command_line = |
| 387 *base::CommandLine::ForCurrentProcess(); | 387 *base::CommandLine::ForCurrentProcess(); |
| 388 if (command_line.HasSwitch(switches::kRunLayoutTest)) { | 388 if (command_line.HasSwitch(switches::kRunLayoutTest)) { |
| 389 return BlinkTestController::Get()->RunBluetoothChooser( | 389 return BlinkTestController::Get()->RunBluetoothChooser( |
| 390 web_contents, event_handler, origin); | 390 web_contents, event_handler, origin); |
| 391 } | 391 } |
| 392 return nullptr; | 392 return nullptr; |
| 393 } | 393 } |
| 394 | 394 |
| 395 bool Shell::AddMessageToConsole(WebContents* source, | 395 bool Shell::AddMessageToConsole(WebContents* source, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 devtools_frontend_->Activate(); | 449 devtools_frontend_->Activate(); |
| 450 devtools_frontend_->Focus(); | 450 devtools_frontend_->Focus(); |
| 451 } | 451 } |
| 452 | 452 |
| 453 void Shell::OnDevToolsWebContentsDestroyed() { | 453 void Shell::OnDevToolsWebContentsDestroyed() { |
| 454 devtools_observer_.reset(); | 454 devtools_observer_.reset(); |
| 455 devtools_frontend_ = NULL; | 455 devtools_frontend_ = NULL; |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace content | 458 } // namespace content |
| OLD | NEW |