| OLD | NEW |
| 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_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // listeners. | 85 // listeners. |
| 86 void NotifyListenerAddedOnIOThread(); | 86 void NotifyListenerAddedOnIOThread(); |
| 87 void NotifyListenerRemovedOnIOThread(); | 87 void NotifyListenerRemovedOnIOThread(); |
| 88 | 88 |
| 89 // Fills the |device| API struct from |device_data|. | 89 // Fills the |device| API struct from |device_data|. |
| 90 void FillDialDevice(const media_router::DialDeviceData& device_data, | 90 void FillDialDevice(const media_router::DialDeviceData& device_data, |
| 91 api::dial::DialDevice* device) const; | 91 api::dial::DialDevice* device) const; |
| 92 | 92 |
| 93 Profile* profile_; | 93 Profile* profile_; |
| 94 | 94 |
| 95 // Created lazily on first access on the IO thread. | 95 // Created lazily on first access on the IO thread. Does not take ownership of |
| 96 std::unique_ptr<media_router::DialRegistry> dial_registry_; | 96 // |dial_registry_|. |
| 97 media_router::DialRegistry* dial_registry_; |
| 97 | 98 |
| 98 // Device data for testing. | 99 // Device data for testing. |
| 99 std::unique_ptr<media_router::DialDeviceData> test_device_data_; | 100 std::unique_ptr<media_router::DialDeviceData> test_device_data_; |
| 100 std::unique_ptr<media_router::DialDeviceDescriptionData> | 101 std::unique_ptr<media_router::DialDeviceDescriptionData> |
| 101 test_device_description_; | 102 test_device_description_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(DialAPI); | 104 DISALLOW_COPY_AND_ASSIGN(DialAPI); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 // DiscoverNow function. This function needs a round-trip from the IO thread | 107 // DiscoverNow function. This function needs a round-trip from the IO thread |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 device_description_fetcher_; | 158 device_description_fetcher_; |
| 158 | 159 |
| 159 DialAPI* dial_; | 160 DialAPI* dial_; |
| 160 | 161 |
| 161 DISALLOW_COPY_AND_ASSIGN(DialFetchDeviceDescriptionFunction); | 162 DISALLOW_COPY_AND_ASSIGN(DialFetchDeviceDescriptionFunction); |
| 162 }; | 163 }; |
| 163 | 164 |
| 164 } // namespace extensions | 165 } // namespace extensions |
| 165 | 166 |
| 166 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ | 167 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ |
| OLD | NEW |