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

Side by Side Diff: extensions/browser/api/hid/hid_device_manager.h

Issue 780713002: Fix remaining WeakPtrFactory ordering problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_
6 #define EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ 6 #define EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 scoped_ptr<base::ListValue> CreateApiDeviceList( 94 scoped_ptr<base::ListValue> CreateApiDeviceList(
95 const Extension* extension, 95 const Extension* extension,
96 const std::vector<device::HidDeviceFilter>& filters); 96 const std::vector<device::HidDeviceFilter>& filters);
97 void OnEnumerationComplete(const std::vector<device::HidDeviceInfo>& devices); 97 void OnEnumerationComplete(const std::vector<device::HidDeviceInfo>& devices);
98 98
99 void DispatchEvent(const std::string& event_name, 99 void DispatchEvent(const std::string& event_name,
100 scoped_ptr<base::ListValue> event_args, 100 scoped_ptr<base::ListValue> event_args,
101 const device::HidDeviceInfo& device_info); 101 const device::HidDeviceInfo& device_info);
102 102
103 base::ThreadChecker thread_checker_; 103 base::ThreadChecker thread_checker_;
104 base::WeakPtrFactory<HidDeviceManager> weak_factory_;
105 EventRouter* event_router_; 104 EventRouter* event_router_;
106 bool initialized_; 105 bool initialized_;
107 ScopedObserver<device::HidService, device::HidService::Observer> 106 ScopedObserver<device::HidService, device::HidService::Observer>
108 hid_service_observer_; 107 hid_service_observer_;
109 bool enumeration_ready_; 108 bool enumeration_ready_;
110 ScopedVector<GetApiDevicesParams> pending_enumerations_; 109 ScopedVector<GetApiDevicesParams> pending_enumerations_;
111 int next_resource_id_; 110 int next_resource_id_;
112 ResourceIdToDeviceIdMap device_ids_; 111 ResourceIdToDeviceIdMap device_ids_;
113 DeviceIdToResourceIdMap resource_ids_; 112 DeviceIdToResourceIdMap resource_ids_;
113 base::WeakPtrFactory<HidDeviceManager> weak_factory_;
114 114
115 DISALLOW_COPY_AND_ASSIGN(HidDeviceManager); 115 DISALLOW_COPY_AND_ASSIGN(HidDeviceManager);
116 }; 116 };
117 117
118 } // namespace extensions 118 } // namespace extensions
119 119
120 #endif // EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ 120 #endif // EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/declarative/rules_registry.h ('k') | extensions/browser/api/hid/hid_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698