OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/bluetooth/bluetooth_device_chooser_controller.h" | 5 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <unordered_set> | 9 #include <unordered_set> |
10 | 10 |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 RecordRequestDeviceOutcome( | 369 RecordRequestDeviceOutcome( |
370 UMARequestDeviceOutcome::BLUETOOTH_CHOOSER_POLICY_DISABLED); | 370 UMARequestDeviceOutcome::BLUETOOTH_CHOOSER_POLICY_DISABLED); |
371 PostErrorCallback(blink::mojom::WebBluetoothResult:: | 371 PostErrorCallback(blink::mojom::WebBluetoothResult:: |
372 CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED); | 372 CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED); |
373 return; | 373 return; |
374 } | 374 } |
375 case ContentBrowserClient::AllowWebBluetoothResult:: | 375 case ContentBrowserClient::AllowWebBluetoothResult:: |
376 BLOCK_GLOBALLY_DISABLED: { | 376 BLOCK_GLOBALLY_DISABLED: { |
377 // Log to the developer console. | 377 // Log to the developer console. |
378 web_contents_->GetMainFrame()->AddMessageToConsole( | 378 web_contents_->GetMainFrame()->AddMessageToConsole( |
379 content::CONSOLE_MESSAGE_LEVEL_LOG, | 379 content::CONSOLE_MESSAGE_LEVEL_INFO, |
dgozman
2017/01/20 17:26:33
Unrelated, but this looks more like a warning.
| |
380 "Bluetooth permission has been blocked."); | 380 "Bluetooth permission has been blocked."); |
381 // Block requests. | 381 // Block requests. |
382 RecordRequestDeviceOutcome( | 382 RecordRequestDeviceOutcome( |
383 UMARequestDeviceOutcome::BLUETOOTH_GLOBALLY_DISABLED); | 383 UMARequestDeviceOutcome::BLUETOOTH_GLOBALLY_DISABLED); |
384 PostErrorCallback(blink::mojom::WebBluetoothResult:: | 384 PostErrorCallback(blink::mojom::WebBluetoothResult:: |
385 CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED); | 385 CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED); |
386 return; | 386 return; |
387 } | 387 } |
388 case ContentBrowserClient::AllowWebBluetoothResult::ALLOW: | 388 case ContentBrowserClient::AllowWebBluetoothResult::ALLOW: |
389 break; | 389 break; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
619 | 619 |
620 void BluetoothDeviceChooserController::PostErrorCallback( | 620 void BluetoothDeviceChooserController::PostErrorCallback( |
621 blink::mojom::WebBluetoothResult error) { | 621 blink::mojom::WebBluetoothResult error) { |
622 if (!base::ThreadTaskRunnerHandle::Get()->PostTask( | 622 if (!base::ThreadTaskRunnerHandle::Get()->PostTask( |
623 FROM_HERE, base::Bind(error_callback_, error))) { | 623 FROM_HERE, base::Bind(error_callback_, error))) { |
624 LOG(WARNING) << "No TaskRunner."; | 624 LOG(WARNING) << "No TaskRunner."; |
625 } | 625 } |
626 } | 626 } |
627 | 627 |
628 } // namespace content | 628 } // namespace content |
OLD | NEW |