| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <clocale> | 9 #include <clocale> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 const GURL& url, | 667 const GURL& url, |
| 668 const base::Callback<void(const blink::WebURLResponse& response, | 668 const base::Callback<void(const blink::WebURLResponse& response, |
| 669 const std::string& data)>& callback) { | 669 const std::string& data)>& callback) { |
| 670 ::content::FetchManifest(view, url, callback); | 670 ::content::FetchManifest(view, url, callback); |
| 671 } | 671 } |
| 672 | 672 |
| 673 void BlinkTestRunner::SetPermission(const std::string& name, | 673 void BlinkTestRunner::SetPermission(const std::string& name, |
| 674 const std::string& value, | 674 const std::string& value, |
| 675 const GURL& origin, | 675 const GURL& origin, |
| 676 const GURL& embedding_origin) { | 676 const GURL& embedding_origin) { |
| 677 content::mojom::PermissionStatus status; | 677 blink::mojom::PermissionStatus status; |
| 678 if (value == "granted") | 678 if (value == "granted") |
| 679 status = mojom::PermissionStatus::GRANTED; | 679 status = blink::mojom::PermissionStatus::GRANTED; |
| 680 else if (value == "prompt") | 680 else if (value == "prompt") |
| 681 status = mojom::PermissionStatus::ASK; | 681 status = blink::mojom::PermissionStatus::ASK; |
| 682 else if (value == "denied") | 682 else if (value == "denied") |
| 683 status = mojom::PermissionStatus::DENIED; | 683 status = blink::mojom::PermissionStatus::DENIED; |
| 684 else { | 684 else { |
| 685 NOTREACHED(); | 685 NOTREACHED(); |
| 686 status = mojom::PermissionStatus::DENIED; | 686 status = blink::mojom::PermissionStatus::DENIED; |
| 687 } | 687 } |
| 688 | 688 |
| 689 Send(new LayoutTestHostMsg_SetPermission( | 689 Send(new LayoutTestHostMsg_SetPermission( |
| 690 routing_id(), name, status, origin, embedding_origin)); | 690 routing_id(), name, status, origin, embedding_origin)); |
| 691 } | 691 } |
| 692 | 692 |
| 693 void BlinkTestRunner::ResetPermissions() { | 693 void BlinkTestRunner::ResetPermissions() { |
| 694 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); | 694 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); |
| 695 } | 695 } |
| 696 | 696 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 get_bluetooth_events_callbacks_.pop_front(); | 1017 get_bluetooth_events_callbacks_.pop_front(); |
| 1018 callback.Run(events); | 1018 callback.Run(events); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 void BlinkTestRunner::ReportLeakDetectionResult( | 1021 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1022 const LeakDetectionResult& report) { | 1022 const LeakDetectionResult& report) { |
| 1023 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1023 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 } // namespace content | 1026 } // namespace content |
| OLD | NEW |