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

Side by Side Diff: content/shell/browser/layout_test/layout_test_message_filter.cc

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: rebase + blink reformat Created 3 years, 8 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/public/browser/permission_type.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/layout_test/layout_test_message_filter.h" 5 #include "content/shell/browser/layout_test/layout_test_message_filter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } else if (name == "push-messaging") { 164 } else if (name == "push-messaging") {
165 type = PermissionType::PUSH_MESSAGING; 165 type = PermissionType::PUSH_MESSAGING;
166 } else if (name == "notifications") { 166 } else if (name == "notifications") {
167 type = PermissionType::NOTIFICATIONS; 167 type = PermissionType::NOTIFICATIONS;
168 } else if (name == "geolocation") { 168 } else if (name == "geolocation") {
169 type = PermissionType::GEOLOCATION; 169 type = PermissionType::GEOLOCATION;
170 } else if (name == "protected-media-identifier") { 170 } else if (name == "protected-media-identifier") {
171 type = PermissionType::PROTECTED_MEDIA_IDENTIFIER; 171 type = PermissionType::PROTECTED_MEDIA_IDENTIFIER;
172 } else if (name == "background-sync") { 172 } else if (name == "background-sync") {
173 type = PermissionType::BACKGROUND_SYNC; 173 type = PermissionType::BACKGROUND_SYNC;
174 } else if (name == "sensors") {
175 type = PermissionType::SENSORS;
174 } else { 176 } else {
175 NOTREACHED(); 177 NOTREACHED();
176 type = PermissionType::NOTIFICATIONS; 178 type = PermissionType::NOTIFICATIONS;
177 } 179 }
178 180
179 LayoutTestContentBrowserClient::Get() 181 LayoutTestContentBrowserClient::Get()
180 ->GetLayoutTestBrowserContext() 182 ->GetLayoutTestBrowserContext()
181 ->GetLayoutTestPermissionManager() 183 ->GetLayoutTestPermissionManager()
182 ->SetPermission(type, status, origin, embedding_origin); 184 ->SetPermission(type, status, origin, embedding_origin);
183 } 185 }
(...skipping 11 matching lines...) Expand all
195 const base::DictionaryValue& changed_layout_test_runtime_flags) { 197 const base::DictionaryValue& changed_layout_test_runtime_flags) {
196 BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged( 198 BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged(
197 render_process_id_, changed_layout_test_runtime_flags); 199 render_process_id_, changed_layout_test_runtime_flags);
198 } 200 }
199 201
200 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() { 202 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() {
201 BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer(); 203 BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer();
202 } 204 }
203 205
204 } // namespace content 206 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/permission_type.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698