| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <clocale> | 10 #include <clocale> |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 const GURL& url, | 605 const GURL& url, |
| 606 const base::Callback<void(const blink::WebURLResponse& response, | 606 const base::Callback<void(const blink::WebURLResponse& response, |
| 607 const std::string& data)>& callback) { | 607 const std::string& data)>& callback) { |
| 608 ::content::FetchManifest(view, url, callback); | 608 ::content::FetchManifest(view, url, callback); |
| 609 } | 609 } |
| 610 | 610 |
| 611 void BlinkTestRunner::SetPermission(const std::string& name, | 611 void BlinkTestRunner::SetPermission(const std::string& name, |
| 612 const std::string& value, | 612 const std::string& value, |
| 613 const GURL& origin, | 613 const GURL& origin, |
| 614 const GURL& embedding_origin) { | 614 const GURL& embedding_origin) { |
| 615 blink::mojom::PermissionStatus status; | 615 permission::mojom::PermissionStatus status; |
| 616 if (value == "granted") | 616 if (value == "granted") |
| 617 status = blink::mojom::PermissionStatus::GRANTED; | 617 status = permission::mojom::PermissionStatus::GRANTED; |
| 618 else if (value == "prompt") | 618 else if (value == "prompt") |
| 619 status = blink::mojom::PermissionStatus::ASK; | 619 status = permission::mojom::PermissionStatus::ASK; |
| 620 else if (value == "denied") | 620 else if (value == "denied") |
| 621 status = blink::mojom::PermissionStatus::DENIED; | 621 status = permission::mojom::PermissionStatus::DENIED; |
| 622 else { | 622 else { |
| 623 NOTREACHED(); | 623 NOTREACHED(); |
| 624 status = blink::mojom::PermissionStatus::DENIED; | 624 status = permission::mojom::PermissionStatus::DENIED; |
| 625 } | 625 } |
| 626 | 626 |
| 627 Send(new LayoutTestHostMsg_SetPermission( | 627 Send(new LayoutTestHostMsg_SetPermission( |
| 628 routing_id(), name, status, origin, embedding_origin)); | 628 routing_id(), name, status, origin, embedding_origin)); |
| 629 } | 629 } |
| 630 | 630 |
| 631 void BlinkTestRunner::ResetPermissions() { | 631 void BlinkTestRunner::ResetPermissions() { |
| 632 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); | 632 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); |
| 633 } | 633 } |
| 634 | 634 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 get_bluetooth_events_callbacks_.pop_front(); | 957 get_bluetooth_events_callbacks_.pop_front(); |
| 958 callback.Run(events); | 958 callback.Run(events); |
| 959 } | 959 } |
| 960 | 960 |
| 961 void BlinkTestRunner::ReportLeakDetectionResult( | 961 void BlinkTestRunner::ReportLeakDetectionResult( |
| 962 const LeakDetectionResult& report) { | 962 const LeakDetectionResult& report) { |
| 963 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 963 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 964 } | 964 } |
| 965 | 965 |
| 966 } // namespace content | 966 } // namespace content |
| OLD | NEW |