OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |