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

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager.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) 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 "chrome/browser/chromeos/accessibility/magnification_manager.h" 5 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <memory>
8 9
9 #include "ash/magnifier/magnification_controller.h" 10 #include "ash/magnifier/magnification_controller.h"
10 #include "ash/magnifier/partial_magnification_controller.h" 11 #include "ash/magnifier/partial_magnification_controller.h"
11 #include "ash/session/session_state_delegate.h" 12 #include "ash/session/session_state_delegate.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "ash/shell_delegate.h" 14 #include "ash/shell_delegate.h"
14 #include "ash/system/tray/system_tray_notifier.h" 15 #include "ash/system/tray/system_tray_notifier.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/singleton.h" 17 #include "base/memory/singleton.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
20 #include "chrome/browser/chromeos/profiles/profile_helper.h" 20 #include "chrome/browser/chromeos/profiles/profile_helper.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/profiles/profile_manager.h" 22 #include "chrome/browser/profiles/profile_manager.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "components/prefs/pref_member.h" 24 #include "components/prefs/pref_member.h"
25 #include "components/prefs/pref_service.h" 25 #include "components/prefs/pref_service.h"
26 #include "content/public/browser/focused_node_details.h" 26 #include "content/public/browser/focused_node_details.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 AccessibilityManager::PrefHandler magnifier_enabled_pref_handler_; 289 AccessibilityManager::PrefHandler magnifier_enabled_pref_handler_;
290 AccessibilityManager::PrefHandler magnifier_type_pref_handler_; 290 AccessibilityManager::PrefHandler magnifier_type_pref_handler_;
291 AccessibilityManager::PrefHandler magnifier_scale_pref_handler_; 291 AccessibilityManager::PrefHandler magnifier_scale_pref_handler_;
292 292
293 ui::MagnifierType type_; 293 ui::MagnifierType type_;
294 bool enabled_; 294 bool enabled_;
295 bool keep_focus_centered_; 295 bool keep_focus_centered_;
296 bool observing_focus_change_in_page_; 296 bool observing_focus_change_in_page_;
297 297
298 content::NotificationRegistrar registrar_; 298 content::NotificationRegistrar registrar_;
299 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; 299 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
300 scoped_ptr<ash::ScopedSessionStateObserver> session_state_observer_; 300 std::unique_ptr<ash::ScopedSessionStateObserver> session_state_observer_;
301 301
302 DISALLOW_COPY_AND_ASSIGN(MagnificationManagerImpl); 302 DISALLOW_COPY_AND_ASSIGN(MagnificationManagerImpl);
303 }; 303 };
304 304
305 // static 305 // static
306 void MagnificationManager::Initialize() { 306 void MagnificationManager::Initialize() {
307 CHECK(g_magnification_manager == NULL); 307 CHECK(g_magnification_manager == NULL);
308 g_magnification_manager = new MagnificationManagerImpl(); 308 g_magnification_manager = new MagnificationManagerImpl();
309 } 309 }
310 310
311 // static 311 // static
312 void MagnificationManager::Shutdown() { 312 void MagnificationManager::Shutdown() {
313 CHECK(g_magnification_manager); 313 CHECK(g_magnification_manager);
314 delete g_magnification_manager; 314 delete g_magnification_manager;
315 g_magnification_manager = NULL; 315 g_magnification_manager = NULL;
316 } 316 }
317 317
318 // static 318 // static
319 MagnificationManager* MagnificationManager::Get() { 319 MagnificationManager* MagnificationManager::Get() {
320 return g_magnification_manager; 320 return g_magnification_manager;
321 } 321 }
322 322
323 } // namespace chromeos 323 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698