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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 const GURL& url, | 669 const GURL& url, |
670 const base::Callback<void(const blink::WebURLResponse& response, | 670 const base::Callback<void(const blink::WebURLResponse& response, |
671 const std::string& data)>& callback) { | 671 const std::string& data)>& callback) { |
672 ::content::FetchManifest(view, url, callback); | 672 ::content::FetchManifest(view, url, callback); |
673 } | 673 } |
674 | 674 |
675 void BlinkTestRunner::SetPermission(const std::string& name, | 675 void BlinkTestRunner::SetPermission(const std::string& name, |
676 const std::string& value, | 676 const std::string& value, |
677 const GURL& origin, | 677 const GURL& origin, |
678 const GURL& embedding_origin) { | 678 const GURL& embedding_origin) { |
679 content::mojom::PermissionStatus status; | 679 blink::mojom::PermissionStatus status; |
680 if (value == "granted") | 680 if (value == "granted") |
681 status = mojom::PermissionStatus::GRANTED; | 681 status = blink::mojom::PermissionStatus::GRANTED; |
682 else if (value == "prompt") | 682 else if (value == "prompt") |
683 status = mojom::PermissionStatus::ASK; | 683 status = blink::mojom::PermissionStatus::ASK; |
684 else if (value == "denied") | 684 else if (value == "denied") |
685 status = mojom::PermissionStatus::DENIED; | 685 status = blink::mojom::PermissionStatus::DENIED; |
686 else { | 686 else { |
687 NOTREACHED(); | 687 NOTREACHED(); |
688 status = mojom::PermissionStatus::DENIED; | 688 status = blink::mojom::PermissionStatus::DENIED; |
689 } | 689 } |
690 | 690 |
691 Send(new LayoutTestHostMsg_SetPermission( | 691 Send(new LayoutTestHostMsg_SetPermission( |
692 routing_id(), name, status, origin, embedding_origin)); | 692 routing_id(), name, status, origin, embedding_origin)); |
693 } | 693 } |
694 | 694 |
695 void BlinkTestRunner::ResetPermissions() { | 695 void BlinkTestRunner::ResetPermissions() { |
696 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); | 696 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); |
697 } | 697 } |
698 | 698 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 get_bluetooth_events_callbacks_.pop_front(); | 1009 get_bluetooth_events_callbacks_.pop_front(); |
1010 callback.Run(events); | 1010 callback.Run(events); |
1011 } | 1011 } |
1012 | 1012 |
1013 void BlinkTestRunner::ReportLeakDetectionResult( | 1013 void BlinkTestRunner::ReportLeakDetectionResult( |
1014 const LeakDetectionResult& report) { | 1014 const LeakDetectionResult& report) { |
1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1016 } | 1016 } |
1017 | 1017 |
1018 } // namespace content | 1018 } // namespace content |
OLD | NEW |