Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1942353002: (reland) Move permission.mojom from WebKit/public/platform/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/common/layout_test/layout_test_messages.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 const GURL& url, 606 const GURL& url,
607 const base::Callback<void(const blink::WebURLResponse& response, 607 const base::Callback<void(const blink::WebURLResponse& response,
608 const std::string& data)>& callback) { 608 const std::string& data)>& callback) {
609 ::content::FetchManifest(view, url, callback); 609 ::content::FetchManifest(view, url, callback);
610 } 610 }
611 611
612 void BlinkTestRunner::SetPermission(const std::string& name, 612 void BlinkTestRunner::SetPermission(const std::string& name,
613 const std::string& value, 613 const std::string& value,
614 const GURL& origin, 614 const GURL& origin,
615 const GURL& embedding_origin) { 615 const GURL& embedding_origin) {
616 blink::mojom::PermissionStatus status; 616 permissions::mojom::PermissionStatus status;
617 if (value == "granted") 617 if (value == "granted")
618 status = blink::mojom::PermissionStatus::GRANTED; 618 status = permissions::mojom::PermissionStatus::GRANTED;
619 else if (value == "prompt") 619 else if (value == "prompt")
620 status = blink::mojom::PermissionStatus::ASK; 620 status = permissions::mojom::PermissionStatus::ASK;
621 else if (value == "denied") 621 else if (value == "denied")
622 status = blink::mojom::PermissionStatus::DENIED; 622 status = permissions::mojom::PermissionStatus::DENIED;
623 else { 623 else {
624 NOTREACHED(); 624 NOTREACHED();
625 status = blink::mojom::PermissionStatus::DENIED; 625 status = permissions::mojom::PermissionStatus::DENIED;
626 } 626 }
627 627
628 Send(new LayoutTestHostMsg_SetPermission( 628 Send(new LayoutTestHostMsg_SetPermission(
629 routing_id(), name, status, origin, embedding_origin)); 629 routing_id(), name, status, origin, embedding_origin));
630 } 630 }
631 631
632 void BlinkTestRunner::ResetPermissions() { 632 void BlinkTestRunner::ResetPermissions() {
633 Send(new LayoutTestHostMsg_ResetPermissions(routing_id())); 633 Send(new LayoutTestHostMsg_ResetPermissions(routing_id()));
634 } 634 }
635 635
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 get_bluetooth_events_callbacks_.pop_front(); 962 get_bluetooth_events_callbacks_.pop_front();
963 callback.Run(events); 963 callback.Run(events);
964 } 964 }
965 965
966 void BlinkTestRunner::ReportLeakDetectionResult( 966 void BlinkTestRunner::ReportLeakDetectionResult(
967 const LeakDetectionResult& report) { 967 const LeakDetectionResult& report) {
968 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 968 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
969 } 969 }
970 970
971 } // namespace content 971 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/common/layout_test/layout_test_messages.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698