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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_device_data.h

Issue 2583853004: [chrome.dial] Adds chrome.dial.fetchDeviceDecription API. (Closed)
Patch Set: Fix initialization Created 3 years, 12 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 namespace api { 17 namespace api {
18 namespace dial { 18 namespace dial {
19 struct DialDevice; 19 struct DialDevice;
20 } // namespace dial
20 } // namespace api 21 } // namespace api
21 } // namespace dial
22 22
23 // Dial device information that is used within the DialService and Registry on 23 // Dial device information that is used within the DialService and Registry on
24 // the IO thread. It is updated as new information arrives and a list of 24 // the IO thread. It is updated as new information arrives and a list of
25 // DialDeviceData is copied and sent to event listeners on the UI thread. 25 // DialDeviceData is copied and sent to event listeners on the UI thread.
26 class DialDeviceData { 26 class DialDeviceData {
27 public: 27 public:
28 DialDeviceData(); 28 DialDeviceData();
29 DialDeviceData(const std::string& device_id, 29 DialDeviceData(const std::string& device_id,
30 const GURL& device_description_url, 30 const GURL& device_description_url,
31 const base::Time& response_time); 31 const base::Time& response_time);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // The time that the most recent response was received. 87 // The time that the most recent response was received.
88 base::Time response_time_; 88 base::Time response_time_;
89 89
90 // Optional (-1 means unset). 90 // Optional (-1 means unset).
91 int max_age_; 91 int max_age_;
92 92
93 // Optional (-1 means unset). 93 // Optional (-1 means unset).
94 int config_id_; 94 int config_id_;
95 }; 95 };
96 96
97 class DialDeviceDescription {
98 public:
99 DialDeviceDescription() = default;
100 DialDeviceDescription(const std::string& device_description,
101 const GURL& app_url);
102
103 ~DialDeviceDescription() = default;
104
105 std::string device_description;
106 GURL app_url;
107 };
108
97 } // namespace extensions 109 } // namespace extensions
98 110
99 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_ 111 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_DEVICE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698