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

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

Issue 2701633002: [Media Router] Add DialMediaSinkService and DeviceDescriptionService (Closed)
Patch Set: Add DialMediaSinkCacheService and unit test Created 3 years, 9 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) 2017 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2017 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_DEVICE_DESCRIPTION_FETCHER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DEVICE_DESCRIPTION_FETCHER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DEVICE_DESCRIPTION_FETCHER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DEVICE_DESCRIPTION_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 27 matching lines...) Expand all
38 // |request_context| is unowned; the caller must ensure that this object does 38 // |request_context| is unowned; the caller must ensure that this object does
39 // not outlive it. 39 // not outlive it.
40 DeviceDescriptionFetcher( 40 DeviceDescriptionFetcher(
41 const GURL& device_description_url, 41 const GURL& device_description_url,
42 net::URLRequestContextGetter* request_context, 42 net::URLRequestContextGetter* request_context,
43 base::OnceCallback<void(const DialDeviceDescriptionData&)> success_cb, 43 base::OnceCallback<void(const DialDeviceDescriptionData&)> success_cb,
44 base::OnceCallback<void(const std::string&)> error_cb); 44 base::OnceCallback<void(const std::string&)> error_cb);
45 45
46 ~DeviceDescriptionFetcher() override; 46 ~DeviceDescriptionFetcher() override;
47 47
48 const GURL& device_description_url() { return device_description_url_; }
49
48 void Start(); 50 void Start();
49 51
50 private: 52 private:
51 // net::URLFetcherDelegate implementation. 53 // net::URLFetcherDelegate implementation.
52 void OnURLFetchComplete(const net::URLFetcher* source) override; 54 void OnURLFetchComplete(const net::URLFetcher* source) override;
53 void OnURLFetchDownloadProgress(const net::URLFetcher* source, 55 void OnURLFetchDownloadProgress(const net::URLFetcher* source,
54 int64_t current, 56 int64_t current,
55 int64_t total, 57 int64_t total,
56 int64_t current_network_bytes) override; 58 int64_t current_network_bytes) override;
57 void OnURLFetchUploadProgress(const net::URLFetcher* source, 59 void OnURLFetchUploadProgress(const net::URLFetcher* source,
(...skipping 10 matching lines...) Expand all
68 base::OnceCallback<void(const DialDeviceDescriptionData&)> success_cb_; 70 base::OnceCallback<void(const DialDeviceDescriptionData&)> success_cb_;
69 base::OnceCallback<void(const std::string&)> error_cb_; 71 base::OnceCallback<void(const std::string&)> error_cb_;
70 std::unique_ptr<net::URLFetcher> fetcher_; 72 std::unique_ptr<net::URLFetcher> fetcher_;
71 }; 73 };
72 74
73 } // namespace dial 75 } // namespace dial
74 } // namespace api 76 } // namespace api
75 } // namespace extensions 77 } // namespace extensions
76 78
77 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DEVICE_DESCRIPTION_FETCHER_H_ 79 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DEVICE_DESCRIPTION_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/dial/dial_registry.h » ('j') | chrome/browser/media/router/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698