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 "ash/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return MagnificationManager::Get()->IsMagnifierEnabled(); | 63 return MagnificationManager::Get()->IsMagnifierEnabled(); |
64 } | 64 } |
65 | 65 |
66 Profile* profile() { | 66 Profile* profile() { |
67 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 67 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
68 DCHECK(profile); | 68 DCHECK(profile); |
69 return profile; | 69 return profile; |
70 } | 70 } |
71 | 71 |
72 PrefService* prefs() { | 72 PrefService* prefs() { |
73 return components::UserPrefs::Get(profile()); | 73 return user_prefs::UserPrefs::Get(profile()); |
74 } | 74 } |
75 | 75 |
76 void EnableScreenManagnifierToPref(bool enabled) { | 76 void EnableScreenManagnifierToPref(bool enabled) { |
77 prefs()->SetBoolean(prefs::kScreenMagnifierEnabled, enabled); | 77 prefs()->SetBoolean(prefs::kScreenMagnifierEnabled, enabled); |
78 } | 78 } |
79 | 79 |
80 void SetScreenManagnifierTypeToPref(ash::MagnifierType type) { | 80 void SetScreenManagnifierTypeToPref(ash::MagnifierType type) { |
81 prefs()->SetInteger(prefs::kScreenMagnifierType, type); | 81 prefs()->SetInteger(prefs::kScreenMagnifierType, type); |
82 } | 82 } |
83 | 83 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 // Enables full screen magnifier. | 365 // Enables full screen magnifier. |
366 SetMagnifierEnabled(true); | 366 SetMagnifierEnabled(true); |
367 EXPECT_TRUE(IsMagnifierEnabled()); | 367 EXPECT_TRUE(IsMagnifierEnabled()); |
368 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); | 368 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); |
369 | 369 |
370 // Confirms that the actual scale is set to the maximum scale. | 370 // Confirms that the actual scale is set to the maximum scale. |
371 EXPECT_EQ(4.0, GetFullScreenMagnifierScale()); | 371 EXPECT_EQ(4.0, GetFullScreenMagnifierScale()); |
372 } | 372 } |
373 | 373 |
374 } // namespace chromeos | 374 } // namespace chromeos |
OLD | NEW |