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

Side by Side Diff: sky/engine/platform/fetcher/MojoFetcher.h

Issue 1154223003: NOT FOR COMMIT: POC of using AuthenticatingURLLoader in Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: updated comment Created 5 years, 6 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
« no previous file with comments | « sky/engine/platform/BUILD.gn ('k') | sky/engine/platform/fetcher/MojoFetcher.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SKY_ENGINE_PLATFORM_FETCHER_MOJOFETCHER_H_ 5 #ifndef SKY_ENGINE_PLATFORM_FETCHER_MOJOFETCHER_H_
6 #define SKY_ENGINE_PLATFORM_FETCHER_MOJOFETCHER_H_ 6 #define SKY_ENGINE_PLATFORM_FETCHER_MOJOFETCHER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" 9 #include "mojo/services/authenticating_url_loader/public/interfaces/authenticati ng_url_loader.mojom.h"
10 10
11 namespace blink { 11 namespace blink {
12 class KURL; 12 class KURL;
13 13
14 class MojoFetcher { 14 class MojoFetcher {
15 public: 15 public:
16 class Client { 16 class Client {
17 public: 17 public:
18 virtual void OnReceivedResponse(mojo::URLResponsePtr) = 0; 18 virtual void OnReceivedResponse(mojo::URLResponsePtr) = 0;
19 19
20 protected: 20 protected:
21 virtual ~Client() { } 21 virtual ~Client() { }
22 }; 22 };
23 23
24 MojoFetcher(Client*, const KURL&); 24 MojoFetcher(Client*, const KURL&);
25 ~MojoFetcher(); 25 ~MojoFetcher();
26 26
27 private: 27 private:
28 void OnReceivedResponse(mojo::URLResponsePtr); 28 void OnReceivedResponse(mojo::URLResponsePtr);
29 29
30 Client* client_; 30 Client* client_;
31 mojo::URLLoaderPtr url_loader_; 31 mojo::AuthenticatingURLLoaderPtr url_loader_;
32 base::WeakPtrFactory<MojoFetcher> weak_factory_; 32 base::WeakPtrFactory<MojoFetcher> weak_factory_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(MojoFetcher); 34 DISALLOW_COPY_AND_ASSIGN(MojoFetcher);
35 }; 35 };
36 36
37 } // namespace blink 37 } // namespace blink
38 38
39 #endif // SKY_ENGINE_PLATFORM_FETCHER_MOJOFETCHER_H_ 39 #endif // SKY_ENGINE_PLATFORM_FETCHER_MOJOFETCHER_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/BUILD.gn ('k') | sky/engine/platform/fetcher/MojoFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698