Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: content/shell/browser/shell.cc

Issue 1601323002: Use GetLastCommittedOrigin instead of GetLastCommittedURL in bluetooth chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed bluetooth test at: requestDevice.html Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/shell/browser/shell.h ('k') | third_party/WebKit/LayoutTests/bluetooth/requestDevice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698