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

Side by Side Diff: content/shell/browser/blink_test_controller.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, 10 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/blink_test_controller.h" 5 #include "content/shell/browser/blink_test_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <iostream> 9 #include <iostream>
10 10
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID())); 371 new ShellViewMsg_NotifyDone(render_view_host->GetRoutingID()));
372 } 372 }
373 373
374 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const { 374 bool BlinkTestController::IsMainWindow(WebContents* web_contents) const {
375 return main_window_ && web_contents == main_window_->web_contents(); 375 return main_window_ && web_contents == main_window_->web_contents();
376 } 376 }
377 377
378 scoped_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser( 378 scoped_ptr<BluetoothChooser> BlinkTestController::RunBluetoothChooser(
379 WebContents* web_contents, 379 WebContents* web_contents,
380 const BluetoothChooser::EventHandler& event_handler, 380 const BluetoothChooser::EventHandler& event_handler,
381 const GURL& origin) { 381 const url::Origin& origin) {
382 if (bluetooth_chooser_factory_) { 382 if (bluetooth_chooser_factory_) {
383 return bluetooth_chooser_factory_->RunBluetoothChooser( 383 return bluetooth_chooser_factory_->RunBluetoothChooser(
384 web_contents, event_handler, origin); 384 web_contents, event_handler, origin);
385 } 385 }
386 return nullptr; 386 return nullptr;
387 } 387 }
388 388
389 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) { 389 bool BlinkTestController::OnMessageReceived(const IPC::Message& message) {
390 DCHECK(CalledOnValidThread()); 390 DCHECK(CalledOnValidThread());
391 bool handled = true; 391 bool handled = true;
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 } else { 769 } else {
770 printer_->AddErrorMessage(base::StringPrintf( 770 printer_->AddErrorMessage(base::StringPrintf(
771 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", 771 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.",
772 event_name.c_str())); 772 event_name.c_str()));
773 return; 773 return;
774 } 774 }
775 bluetooth_chooser_factory_->SendEvent(event, argument); 775 bluetooth_chooser_factory_->SendEvent(event, argument);
776 } 776 }
777 777
778 } // namespace content 778 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698