OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_H_ |
6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_H_ | 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/notifications/notification_delegate.h" | 12 #include "chrome/browser/notifications/notification_delegate.h" |
12 #include "chrome/browser/printing/cloud_print/privet_device_lister.h" | 13 #include "chrome/browser/printing/cloud_print/privet_device_lister.h" |
13 #include "chrome/browser/printing/cloud_print/privet_http.h" | 14 #include "chrome/browser/printing/cloud_print/privet_http.h" |
14 #include "components/keyed_service/core/keyed_service.h" | 15 #include "components/keyed_service/core/keyed_service.h" |
15 #include "components/prefs/pref_member.h" | 16 #include "components/prefs/pref_member.h" |
16 | 17 |
17 class NotificationUIManager; | 18 class NotificationUIManager; |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 class BrowserContext; | 21 class BrowserContext; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 DeviceContext(); | 69 DeviceContext(); |
69 ~DeviceContext(); | 70 ~DeviceContext(); |
70 | 71 |
71 bool notification_may_be_active; | 72 bool notification_may_be_active; |
72 bool registered; | 73 bool registered; |
73 scoped_ptr<PrivetJSONOperation> info_operation; | 74 scoped_ptr<PrivetJSONOperation> info_operation; |
74 scoped_ptr<PrivetHTTPResolution> privet_http_resolution; | 75 scoped_ptr<PrivetHTTPResolution> privet_http_resolution; |
75 scoped_ptr<PrivetHTTPClient> privet_http; | 76 scoped_ptr<PrivetHTTPClient> privet_http; |
76 }; | 77 }; |
77 | 78 |
78 typedef std::map<std::string, linked_ptr<DeviceContext> > DeviceContextMap; | 79 using DeviceContextMap = std::map<std::string, scoped_ptr<DeviceContext>>; |
79 | 80 |
80 void CreateInfoOperation(scoped_ptr<PrivetHTTPClient> http_client); | 81 void CreateInfoOperation(scoped_ptr<PrivetHTTPClient> http_client); |
81 void OnPrivetInfoDone(DeviceContext* device, | 82 void OnPrivetInfoDone(DeviceContext* device, |
82 const base::DictionaryValue* json_value); | 83 const base::DictionaryValue* json_value); |
83 | 84 |
84 | 85 |
85 void NotifyDeviceRemoved(); | 86 void NotifyDeviceRemoved(); |
86 | 87 |
87 Delegate* delegate_; | 88 Delegate* delegate_; |
88 scoped_ptr<PrivetDeviceLister> device_lister_; | 89 scoped_ptr<PrivetDeviceLister> device_lister_; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void DisableNotifications(); | 146 void DisableNotifications(); |
146 | 147 |
147 ~PrivetNotificationDelegate() override; | 148 ~PrivetNotificationDelegate() override; |
148 | 149 |
149 content::BrowserContext* profile_; | 150 content::BrowserContext* profile_; |
150 }; | 151 }; |
151 | 152 |
152 } // namespace cloud_print | 153 } // namespace cloud_print |
153 | 154 |
154 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_H_ | 155 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_PRIVET_NOTIFICATIONS_H_ |
OLD | NEW |