| OLD | NEW |
| 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_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/local_discovery/cloud_device_list_delegate.h" | 12 #include "chrome/browser/local_discovery/cloud_device_list_delegate.h" |
| 13 #include "chrome/browser/local_discovery/gcd_api_flow.h" | 13 #include "chrome/browser/local_discovery/gcd_api_flow.h" |
| 14 | 14 |
| 15 namespace local_discovery { | 15 namespace local_discovery { |
| 16 | 16 |
| 17 class CloudDeviceList : public GCDApiFlowRequest { | 17 class CloudDeviceList : public GCDApiFlowRequest { |
| 18 public: | 18 public: |
| 19 typedef std::vector<CloudDeviceListDelegate::Device> DeviceList; | 19 typedef std::vector<CloudDeviceListDelegate::Device> DeviceList; |
| 20 typedef DeviceList::const_iterator iterator; | 20 typedef DeviceList::const_iterator iterator; |
| 21 | 21 |
| 22 explicit CloudDeviceList(CloudDeviceListDelegate* delegate); | 22 explicit CloudDeviceList(CloudDeviceListDelegate* delegate); |
| 23 virtual ~CloudDeviceList(); | 23 virtual ~CloudDeviceList(); |
| 24 | 24 |
| 25 virtual void OnGCDAPIFlowError(GCDApiFlow::Status status) OVERRIDE; | 25 virtual void OnGCDAPIFlowError(GCDApiFlow::Status status) override; |
| 26 | 26 |
| 27 virtual void OnGCDAPIFlowComplete( | 27 virtual void OnGCDAPIFlowComplete( |
| 28 const base::DictionaryValue& value) OVERRIDE; | 28 const base::DictionaryValue& value) override; |
| 29 | 29 |
| 30 virtual GURL GetURL() OVERRIDE; | 30 virtual GURL GetURL() override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 bool FillDeviceDetails(const base::DictionaryValue& value, | 33 bool FillDeviceDetails(const base::DictionaryValue& value, |
| 34 CloudDeviceListDelegate::Device* device); | 34 CloudDeviceListDelegate::Device* device); |
| 35 | 35 |
| 36 CloudDeviceListDelegate* delegate_; | 36 CloudDeviceListDelegate* delegate_; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace local_discovery | 39 } // namespace local_discovery |
| 40 | 40 |
| 41 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_ | 41 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_ |
| OLD | NEW |