| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 const GURL& url, | 684 const GURL& url, |
| 685 const base::Callback<void(const blink::WebURLResponse& response, | 685 const base::Callback<void(const blink::WebURLResponse& response, |
| 686 const std::string& data)>& callback) { | 686 const std::string& data)>& callback) { |
| 687 ::content::FetchManifest(view, url, callback); | 687 ::content::FetchManifest(view, url, callback); |
| 688 } | 688 } |
| 689 | 689 |
| 690 void BlinkTestRunner::SetPermission(const std::string& name, | 690 void BlinkTestRunner::SetPermission(const std::string& name, |
| 691 const std::string& value, | 691 const std::string& value, |
| 692 const GURL& origin, | 692 const GURL& origin, |
| 693 const GURL& embedding_origin) { | 693 const GURL& embedding_origin) { |
| 694 content::PermissionStatus status; | 694 blink::mojom::PermissionStatus status; |
| 695 if (value == "granted") | 695 if (value == "granted") |
| 696 status = PermissionStatus::GRANTED; | 696 status = blink::mojom::PermissionStatus::GRANTED; |
| 697 else if (value == "prompt") | 697 else if (value == "prompt") |
| 698 status = PermissionStatus::ASK; | 698 status = blink::mojom::PermissionStatus::ASK; |
| 699 else if (value == "denied") | 699 else if (value == "denied") |
| 700 status = PermissionStatus::DENIED; | 700 status = blink::mojom::PermissionStatus::DENIED; |
| 701 else { | 701 else { |
| 702 NOTREACHED(); | 702 NOTREACHED(); |
| 703 status = PermissionStatus::DENIED; | 703 status = blink::mojom::PermissionStatus::DENIED; |
| 704 } | 704 } |
| 705 | 705 |
| 706 Send(new LayoutTestHostMsg_SetPermission( | 706 Send(new LayoutTestHostMsg_SetPermission( |
| 707 routing_id(), name, status, origin, embedding_origin)); | 707 routing_id(), name, status, origin, embedding_origin)); |
| 708 } | 708 } |
| 709 | 709 |
| 710 void BlinkTestRunner::ResetPermissions() { | 710 void BlinkTestRunner::ResetPermissions() { |
| 711 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); | 711 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); |
| 712 } | 712 } |
| 713 | 713 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 get_bluetooth_events_callbacks_.pop_front(); | 1033 get_bluetooth_events_callbacks_.pop_front(); |
| 1034 callback.Run(events); | 1034 callback.Run(events); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 void BlinkTestRunner::ReportLeakDetectionResult( | 1037 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1038 const LeakDetectionResult& report) { | 1038 const LeakDetectionResult& report) { |
| 1039 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1039 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 } // namespace content | 1042 } // namespace content |
| OLD | NEW |