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

Side by Side Diff: chrome/browser/extensions/api/hid/hid_connection_resource.h

Issue 329853010: Additional methods for chrome.logPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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 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 CHROME_BROWSER_EXTENSIONS_API_HID_HID_CONNECTION_RESOURCE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_HID_HID_CONNECTION_RESOURCE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_HID_HID_CONNECTION_RESOURCE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_HID_HID_CONNECTION_RESOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "device/hid/hid_connection.h" 12 #include "device/hid/hid_connection.h"
13 #include "extensions/browser/api/api_resource.h" 13 #include "extensions/browser/api/api_resource.h"
14 #include "extensions/browser/api/api_resource_manager.h" 14 #include "extensions/browser/api/api_resource_manager.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 class HidConnectionResource : public ApiResource { 18 class HidConnectionResource : public ApiResource {
19 public: 19 public:
20 HidConnectionResource(const std::string& owner_extension_id, 20 HidConnectionResource(const std::string& owner_extension_id,
21 scoped_refptr<device::HidConnection> connection); 21 scoped_refptr<device::HidConnection> connection);
22 virtual ~HidConnectionResource(); 22 virtual ~HidConnectionResource();
23 23
24 scoped_refptr<device::HidConnection> connection() const { 24 scoped_refptr<device::HidConnection> connection() const {
25 return connection_; 25 return connection_;
26 } 26 }
27 27
28 private:
29 friend class ApiResourceManager<HidConnectionResource>;
30
31 static const char* service_name() { return "HidConnectionResourceManager"; } 28 static const char* service_name() { return "HidConnectionResourceManager"; }
32 29
33 static const content::BrowserThread::ID kThreadId = 30 static const content::BrowserThread::ID kThreadId =
34 content::BrowserThread::FILE; 31 content::BrowserThread::FILE;
35 32
33 private:
36 scoped_refptr<device::HidConnection> connection_; 34 scoped_refptr<device::HidConnection> connection_;
37 35
38 DISALLOW_COPY_AND_ASSIGN(HidConnectionResource); 36 DISALLOW_COPY_AND_ASSIGN(HidConnectionResource);
39 }; 37 };
40 38
41 } // namespace extensions 39 } // namespace extensions
42 40
43 #endif // CHROME_BROWSER_EXTENSIONS_API_HID_HID_CONNECTION_RESOURCE_H_ 41 #endif // CHROME_BROWSER_EXTENSIONS_API_HID_HID_CONNECTION_RESOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system_logs/debug_log_writer.cc ('k') | chrome/browser/extensions/api/log_private/log_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698