Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/chromeos/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include "ash/magnifier/magnification_controller.h" 7 #include "ash/magnifier/magnification_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 observed_type_ = details.notification_type; 84 observed_type_ = details.notification_type;
85 observed_enabled_ = details.enabled; 85 observed_enabled_ = details.enabled;
86 observed_ = true; 86 observed_ = true;
87 } 87 }
88 } 88 }
89 89
90 bool observed_; 90 bool observed_;
91 bool observed_enabled_; 91 bool observed_enabled_;
92 int observed_type_; 92 int observed_type_;
93 93
94 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_; 94 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(MockAccessibilityObserver); 96 DISALLOW_COPY_AND_ASSIGN(MockAccessibilityObserver);
97 }; 97 };
98 98
99 void SetLargeCursorEnabled(bool enabled) { 99 void SetLargeCursorEnabled(bool enabled) {
100 return AccessibilityManager::Get()->EnableLargeCursor(enabled); 100 return AccessibilityManager::Get()->EnableLargeCursor(enabled);
101 } 101 }
102 102
103 bool IsLargeCursorEnabled() { 103 bool IsLargeCursorEnabled() {
104 return AccessibilityManager::Get()->IsLargeCursorEnabled(); 104 return AccessibilityManager::Get()->IsLargeCursorEnabled();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool GetAutoclickEnabledFromPref() { 198 bool GetAutoclickEnabledFromPref() {
199 return GetPrefs()->GetBoolean(prefs::kAccessibilityAutoclickEnabled); 199 return GetPrefs()->GetBoolean(prefs::kAccessibilityAutoclickEnabled);
200 } 200 }
201 201
202 int GetAutoclickDelayFromPref() { 202 int GetAutoclickDelayFromPref() {
203 return GetPrefs()->GetInteger(prefs::kAccessibilityAutoclickDelayMs); 203 return GetPrefs()->GetInteger(prefs::kAccessibilityAutoclickDelayMs);
204 } 204 }
205 205
206 bool IsBrailleImeActive() { 206 bool IsBrailleImeActive() {
207 InputMethodManager* imm = InputMethodManager::Get(); 207 InputMethodManager* imm = InputMethodManager::Get();
208 scoped_ptr<InputMethodDescriptors> descriptors = 208 std::unique_ptr<InputMethodDescriptors> descriptors =
209 imm->GetActiveIMEState()->GetActiveInputMethods(); 209 imm->GetActiveIMEState()->GetActiveInputMethods();
210 for (InputMethodDescriptors::const_iterator i = descriptors->begin(); 210 for (InputMethodDescriptors::const_iterator i = descriptors->begin();
211 i != descriptors->end(); 211 i != descriptors->end();
212 ++i) { 212 ++i) {
213 if (i->id() == extension_misc::kBrailleImeEngineId) 213 if (i->id() == extension_misc::kBrailleImeEngineId)
214 return true; 214 return true;
215 } 215 }
216 return false; 216 return false;
217 } 217 }
218 218
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 711 EXPECT_FALSE(ShouldShowAccessibilityMenu());
712 712
713 // Check on-screen keyboard. 713 // Check on-screen keyboard.
714 SetVirtualKeyboardEnabled(true); 714 SetVirtualKeyboardEnabled(true);
715 EXPECT_TRUE(ShouldShowAccessibilityMenu()); 715 EXPECT_TRUE(ShouldShowAccessibilityMenu());
716 SetVirtualKeyboardEnabled(false); 716 SetVirtualKeyboardEnabled(false);
717 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 717 EXPECT_FALSE(ShouldShowAccessibilityMenu());
718 } 718 }
719 719
720 } // namespace chromeos 720 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698