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

Side by Side Diff: extensions/shell/browser/shell_device_client.h

Issue 2482463002: Remove DeviceMonitorLinux::WillDestroyCurrentMessageLoop(). (Closed)
Patch Set: CR achuithb #24 Created 4 years, 1 month 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_SHELL_BROWSER_SHELL_DEVICE_CLIENT_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_DEVICE_CLIENT_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DEVICE_CLIENT_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DEVICE_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "device/base/device_client.h" 12 #include "device/base/device_client.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 // Implementation of device::DeviceClient that returns //device API service 16 // Implementation of device::DeviceClient that returns //device API service
17 // singletons appropriate for use within app shell. 17 // singletons appropriate for use within app shell.
18 class ShellDeviceClient : device::DeviceClient { 18 class ShellDeviceClient : device::DeviceClient {
19 public: 19 public:
20 ShellDeviceClient(); 20 ShellDeviceClient();
21 ~ShellDeviceClient() override; 21 ~ShellDeviceClient() override;
22 22
23 // Must be called before the destructor, when the FILE thread is still alive.
24 void Shutdown();
25
23 // device::DeviceClient implementation 26 // device::DeviceClient implementation
24 device::UsbService* GetUsbService() override; 27 device::UsbService* GetUsbService() override;
25 device::HidService* GetHidService() override; 28 device::HidService* GetHidService() override;
26 29
27 private: 30 private:
31 #if DCHECK_IS_ON()
32 bool did_shutdown_ = false;
33 #endif
34
28 std::unique_ptr<device::HidService> hid_service_; 35 std::unique_ptr<device::HidService> hid_service_;
29 std::unique_ptr<device::UsbService> usb_service_; 36 std::unique_ptr<device::UsbService> usb_service_;
30 37
31 DISALLOW_COPY_AND_ASSIGN(ShellDeviceClient); 38 DISALLOW_COPY_AND_ASSIGN(ShellDeviceClient);
32 }; 39 };
33 40
34 } 41 }
35 42
36 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DEVICE_CLIENT_H_ 43 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_browser_main_parts.cc ('k') | extensions/shell/browser/shell_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698