| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3122 | 3122 |
| 3123 class MediaStreamDevicesControllerBrowserTest | 3123 class MediaStreamDevicesControllerBrowserTest |
| 3124 : public PolicyTest, | 3124 : public PolicyTest, |
| 3125 public testing::WithParamInterface<bool> { | 3125 public testing::WithParamInterface<bool> { |
| 3126 public: | 3126 public: |
| 3127 // TODO(raymes): When crbug.com/606138 is finished and the | 3127 // TODO(raymes): When crbug.com/606138 is finished and the |
| 3128 // PermissionRequestManager is used to show all prompts on Android/Desktop | 3128 // PermissionRequestManager is used to show all prompts on Android/Desktop |
| 3129 // we should remove PermissionPromptDelegate and just use | 3129 // we should remove PermissionPromptDelegate and just use |
| 3130 // MockPermissionPromptFactory instead. The APIs are the same. | 3130 // MockPermissionPromptFactory instead. The APIs are the same. |
| 3131 class TestPermissionPromptDelegate | 3131 class TestPermissionPromptDelegate |
| 3132 : public MediaStreamDevicesController::PermissionPromptDelegate { | 3132 : public ::internal::PermissionPromptDelegate { |
| 3133 public: | 3133 public: |
| 3134 void ShowPrompt( | 3134 void ShowPrompt( |
| 3135 bool user_gesture, | 3135 bool user_gesture, |
| 3136 content::WebContents* web_contents, | 3136 content::WebContents* web_contents, |
| 3137 std::unique_ptr<MediaStreamDevicesController> controller) override { | 3137 std::unique_ptr<MediaStreamDevicesController> controller) override { |
| 3138 if (response_type_ == PermissionRequestManager::ACCEPT_ALL) | 3138 if (response_type_ == PermissionRequestManager::ACCEPT_ALL) |
| 3139 controller->PermissionGranted(); | 3139 controller->PermissionGranted(); |
| 3140 else if (response_type_ == PermissionRequestManager::DENY_ALL) | 3140 else if (response_type_ == PermissionRequestManager::DENY_ALL) |
| 3141 controller->PermissionDenied(); | 3141 controller->PermissionDenied(); |
| 3142 } | 3142 } |
| (...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4470 | 4470 |
| 4471 SetEmptyPolicy(); | 4471 SetEmptyPolicy(); |
| 4472 // Policy not set. | 4472 // Policy not set. |
| 4473 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4473 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
| 4474 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4474 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
| 4475 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4475 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4476 } | 4476 } |
| 4477 #endif // defined(OS_CHROMEOS) | 4477 #endif // defined(OS_CHROMEOS) |
| 4478 | 4478 |
| 4479 } // namespace policy | 4479 } // namespace policy |
| OLD | NEW |