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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 #include "ui/base/l10n/l10n_util.h" | 185 #include "ui/base/l10n/l10n_util.h" |
186 #include "ui/base/page_transition_types.h" | 186 #include "ui/base/page_transition_types.h" |
187 #include "ui/base/resource/resource_bundle.h" | 187 #include "ui/base/resource/resource_bundle.h" |
188 #include "url/gurl.h" | 188 #include "url/gurl.h" |
189 #include "url/origin.h" | 189 #include "url/origin.h" |
190 | 190 |
191 #if defined(OS_CHROMEOS) | 191 #if defined(OS_CHROMEOS) |
192 #include "ash/common/accelerators/accelerator_controller.h" | 192 #include "ash/common/accelerators/accelerator_controller.h" |
193 #include "ash/common/accelerators/accelerator_table.h" | 193 #include "ash/common/accelerators/accelerator_table.h" |
194 #include "ash/common/accessibility_types.h" | 194 #include "ash/common/accessibility_types.h" |
| 195 #include "ash/common/wm_shell.h" |
195 #include "ash/shell.h" | 196 #include "ash/shell.h" |
196 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 197 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
197 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 198 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
198 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 199 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
199 #include "chrome/browser/chromeos/login/test/js_checker.h" | 200 #include "chrome/browser/chromeos/login/test/js_checker.h" |
200 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h" | 201 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h" |
201 #include "chrome/browser/profiles/profile_manager.h" | 202 #include "chrome/browser/profiles/profile_manager.h" |
202 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" | 203 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" |
203 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 204 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
204 #include "chromeos/audio/cras_audio_handler.h" | 205 #include "chromeos/audio/cras_audio_handler.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 std::unique_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber( | 732 std::unique_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber( |
732 new ChromeScreenshotGrabber); | 733 new ChromeScreenshotGrabber); |
733 // ScreenshotGrabber doesn't own this observer, so the observer's lifetime | 734 // ScreenshotGrabber doesn't own this observer, so the observer's lifetime |
734 // is tied to the test instead. | 735 // is tied to the test instead. |
735 chrome_screenshot_grabber->screenshot_grabber()->AddObserver(&observer_); | 736 chrome_screenshot_grabber->screenshot_grabber()->AddObserver(&observer_); |
736 ash::Shell::GetInstance() | 737 ash::Shell::GetInstance() |
737 ->accelerator_controller_delegate() | 738 ->accelerator_controller_delegate() |
738 ->SetScreenshotDelegate(std::move(chrome_screenshot_grabber)); | 739 ->SetScreenshotDelegate(std::move(chrome_screenshot_grabber)); |
739 | 740 |
740 SetScreenshotPolicy(enabled); | 741 SetScreenshotPolicy(enabled); |
741 ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled( | 742 ash::WmShell::Get()->accelerator_controller()->PerformActionIfEnabled( |
742 ash::TAKE_SCREENSHOT); | 743 ash::TAKE_SCREENSHOT); |
743 | 744 |
744 content::RunMessageLoop(); | 745 content::RunMessageLoop(); |
745 static_cast<ChromeScreenshotGrabber*>( | 746 static_cast<ChromeScreenshotGrabber*>( |
746 ash::Shell::GetInstance() | 747 ash::Shell::GetInstance() |
747 ->accelerator_controller_delegate() | 748 ->accelerator_controller_delegate() |
748 ->screenshot_delegate()) | 749 ->screenshot_delegate()) |
749 ->screenshot_grabber() | 750 ->screenshot_grabber() |
750 ->RemoveObserver(&observer_); | 751 ->RemoveObserver(&observer_); |
751 } | 752 } |
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4090 | 4091 |
4091 SetEmptyPolicy(); | 4092 SetEmptyPolicy(); |
4092 // Policy not set. | 4093 // Policy not set. |
4093 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4094 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
4094 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4095 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
4095 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4096 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
4096 } | 4097 } |
4097 #endif // defined(OS_CHROMEOS) | 4098 #endif // defined(OS_CHROMEOS) |
4098 | 4099 |
4099 } // namespace policy | 4100 } // namespace policy |
OLD | NEW |