| 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 const GURL& url, | 711 const GURL& url, |
| 712 const base::Callback<void(const blink::WebURLResponse& response, | 712 const base::Callback<void(const blink::WebURLResponse& response, |
| 713 const std::string& data)>& callback) { | 713 const std::string& data)>& callback) { |
| 714 ::content::FetchManifest(view, url, callback); | 714 ::content::FetchManifest(view, url, callback); |
| 715 } | 715 } |
| 716 | 716 |
| 717 void BlinkTestRunner::SetPermission(const std::string& name, | 717 void BlinkTestRunner::SetPermission(const std::string& name, |
| 718 const std::string& value, | 718 const std::string& value, |
| 719 const GURL& origin, | 719 const GURL& origin, |
| 720 const GURL& embedding_origin) { | 720 const GURL& embedding_origin) { |
| 721 content::PermissionStatus status; | 721 blink::mojom::PermissionStatus status; |
| 722 if (value == "granted") | 722 if (value == "granted") |
| 723 status = PermissionStatus::GRANTED; | 723 status = blink::mojom::PermissionStatus::GRANTED; |
| 724 else if (value == "prompt") | 724 else if (value == "prompt") |
| 725 status = PermissionStatus::ASK; | 725 status = blink::mojom::PermissionStatus::ASK; |
| 726 else if (value == "denied") | 726 else if (value == "denied") |
| 727 status = PermissionStatus::DENIED; | 727 status = blink::mojom::PermissionStatus::DENIED; |
| 728 else { | 728 else { |
| 729 NOTREACHED(); | 729 NOTREACHED(); |
| 730 status = PermissionStatus::DENIED; | 730 status = blink::mojom::PermissionStatus::DENIED; |
| 731 } | 731 } |
| 732 | 732 |
| 733 Send(new LayoutTestHostMsg_SetPermission( | 733 Send(new LayoutTestHostMsg_SetPermission( |
| 734 routing_id(), name, status, origin, embedding_origin)); | 734 routing_id(), name, status, origin, embedding_origin)); |
| 735 } | 735 } |
| 736 | 736 |
| 737 void BlinkTestRunner::ResetPermissions() { | 737 void BlinkTestRunner::ResetPermissions() { |
| 738 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); | 738 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); |
| 739 } | 739 } |
| 740 | 740 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 get_bluetooth_events_callbacks_.pop_front(); | 1066 get_bluetooth_events_callbacks_.pop_front(); |
| 1067 callback.Run(events); | 1067 callback.Run(events); |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 void BlinkTestRunner::ReportLeakDetectionResult( | 1070 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1071 const LeakDetectionResult& report) { | 1071 const LeakDetectionResult& report) { |
| 1072 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1072 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 } // namespace content | 1075 } // namespace content |
| OLD | NEW |