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_util.h" | 10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
11 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 11 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
12 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 12 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
13 #include "chrome/browser/chromeos/login/helper.h" | 13 #include "chrome/browser/chromeos/login/helper.h" |
14 #include "chrome/browser/chromeos/login/login_utils.h" | 14 #include "chrome/browser/chromeos/login/login_utils.h" |
15 #include "chrome/browser/chromeos/login/user_manager.h" | 15 #include "chrome/browser/chromeos/login/user_manager.h" |
16 #include "chrome/browser/chromeos/login/user_manager_impl.h" | 16 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/common/chrome_notification_types.h" | 19 #include "chrome/common/chrome_notification_types.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, | 103 chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, |
104 content::NotificationService::AllSources()); | 104 content::NotificationService::AllSources()); |
105 } | 105 } |
106 | 106 |
107 // content::NotificationObserver implementation. | 107 // content::NotificationObserver implementation. |
108 virtual void Observe(int type, | 108 virtual void Observe(int type, |
109 const content::NotificationSource& source, | 109 const content::NotificationSource& source, |
110 const content::NotificationDetails& details) OVERRIDE { | 110 const content::NotificationDetails& details) OVERRIDE { |
111 switch (type) { | 111 switch (type) { |
112 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: { | 112 case chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER: { |
113 accessibility::AccessibilityStatusEventDetails* accessibility_status = | 113 AccessibilityStatusEventDetails* accessibility_status = |
114 content::Details<accessibility::AccessibilityStatusEventDetails>( | 114 content::Details<AccessibilityStatusEventDetails>( |
115 details).ptr(); | 115 details).ptr(); |
Daniel Erat
2013/04/26 13:58:58
i think you can unwrap this line now
yoshiki
2013/05/24 18:49:45
Done.
| |
116 | 116 |
117 observed_ = true; | 117 observed_ = true; |
118 observed_enabled_ = accessibility_status->enabled; | 118 observed_enabled_ = accessibility_status->enabled; |
119 observed_type_ = accessibility_status->magnifier_type; | 119 observed_type_ = accessibility_status->magnifier_type; |
120 break; | 120 break; |
121 } | 121 } |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 bool observed_; | 125 bool observed_; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 // Enables full screen magnifier. | 362 // Enables full screen magnifier. |
363 SetMagnifierEnabled(true); | 363 SetMagnifierEnabled(true); |
364 EXPECT_TRUE(IsMagnifierEnabled()); | 364 EXPECT_TRUE(IsMagnifierEnabled()); |
365 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); | 365 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); |
366 | 366 |
367 // Confirms that the actual scale is set to the maximum scale. | 367 // Confirms that the actual scale is set to the maximum scale. |
368 EXPECT_EQ(4.0, GetFullScreenMagnifierScale()); | 368 EXPECT_EQ(4.0, GetFullScreenMagnifierScale()); |
369 } | 369 } |
370 | 370 |
371 } // namespace chromeos | 371 } // namespace chromeos |
OLD | NEW |