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

Side by Side Diff: chrome/browser/chromeos/system/pointer_device_observer.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos with range-based for (Closed)
Patch Set: Created 4 years, 2 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/system/pointer_device_observer.h" 5 #include "chrome/browser/chromeos/system/pointer_device_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "chrome/browser/chromeos/system/input_device_settings.h" 9 #include "chrome/browser/chromeos/system/input_device_settings.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 weak_factory_.GetWeakPtr())); 54 weak_factory_.GetWeakPtr()));
55 } 55 }
56 56
57 void PointerDeviceObserver::CheckMouseExists() { 57 void PointerDeviceObserver::CheckMouseExists() {
58 InputDeviceSettings::Get()->MouseExists( 58 InputDeviceSettings::Get()->MouseExists(
59 base::Bind(&PointerDeviceObserver::OnMouseExists, 59 base::Bind(&PointerDeviceObserver::OnMouseExists,
60 weak_factory_.GetWeakPtr())); 60 weak_factory_.GetWeakPtr()));
61 } 61 }
62 62
63 void PointerDeviceObserver::OnTouchpadExists(bool exists) { 63 void PointerDeviceObserver::OnTouchpadExists(bool exists) {
64 FOR_EACH_OBSERVER(Observer, observers_, TouchpadExists(exists)); 64 for (auto& observer : observers_)
65 observer.TouchpadExists(exists);
65 } 66 }
66 67
67 void PointerDeviceObserver::OnMouseExists(bool exists) { 68 void PointerDeviceObserver::OnMouseExists(bool exists) {
68 FOR_EACH_OBSERVER(Observer, observers_, MouseExists(exists)); 69 for (auto& observer : observers_)
70 observer.MouseExists(exists);
69 } 71 }
70 72
71 PointerDeviceObserver::Observer::~Observer() { 73 PointerDeviceObserver::Observer::~Observer() {
72 } 74 }
73 75
74 } // namespace system 76 } // namespace system
75 } // namespace chromeos 77 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system/device_disabling_manager.cc ('k') | chrome/browser/chromeos/system/system_clock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698