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

Side by Side Diff: blimp/client/core/blimp_client_context_impl.h

Issue 2320923002: Add a full Blimp integration test. (Closed)
Patch Set: Fix build break with chrome embedder Created 4 years, 3 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 | « blimp/client/core/BUILD.gn ('k') | blimp/client/core/blimp_client_context_impl.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ 5 #ifndef BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_
6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ 6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 52 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
53 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 53 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
54 std::unique_ptr<CompositorDependencies> compositor_dependencies); 54 std::unique_ptr<CompositorDependencies> compositor_dependencies);
55 ~BlimpClientContextImpl() override; 55 ~BlimpClientContextImpl() override;
56 56
57 // BlimpClientContext implementation. 57 // BlimpClientContext implementation.
58 void SetDelegate(BlimpClientContextDelegate* delegate) override; 58 void SetDelegate(BlimpClientContextDelegate* delegate) override;
59 std::unique_ptr<BlimpContents> CreateBlimpContents( 59 std::unique_ptr<BlimpContents> CreateBlimpContents(
60 gfx::NativeWindow window) override; 60 gfx::NativeWindow window) override;
61 void Connect() override; 61 void Connect() override;
62 void ConnectWithAssignment(const Assignment& assignment) override;
62 63
63 // NetworkEventObserver implementation. 64 // NetworkEventObserver implementation.
64 void OnConnected() override; 65 void OnConnected() override;
65 void OnDisconnected(int result) override; 66 void OnDisconnected(int result) override;
66 67
67 protected: 68 protected:
68 // Returns the URL to use for connections to the assigner. Used to construct 69 // Returns the URL to use for connections to the assigner. Used to construct
69 // the AssignmentSource. 70 // the AssignmentSource.
70 virtual GURL GetAssignerURL(); 71 virtual GURL GetAssignerURL();
71 72
72 IdentitySource* GetIdentitySource(); 73 IdentitySource* GetIdentitySource();
73 74
74 private: 75 private:
75 // Connect to assignment source with OAuth2 token to get an assignment. 76 // Called when an OAuth2 token is received. Will then ask the
76 virtual void ConnectToAssignmentSource(const std::string& client_auth_token); 77 // AssignmentSource for an Assignment with this token.
78 virtual void OnAuthTokenReceived(const std::string& client_auth_token);
77 79
78 // The AssignmentCallback for when an assignment is ready. This will trigger 80 // Called when the AssignmentSource is finished getting an Assignment. Will
79 // a connection to the engine. 81 // then call |ConnectWithAssignment| to initiate the actual connection.
80 virtual void ConnectWithAssignment(AssignmentRequestResult result, 82 virtual void OnAssignmentReceived(AssignmentRequestResult result,
81 const Assignment& assignment); 83 const Assignment& assignment);
82 84
83 void RegisterFeatures(); 85 void RegisterFeatures();
84 void InitializeSettings(); 86 void InitializeSettings();
85 87
86 // Create IdentitySource which provides user sign in states and OAuth2 token 88 // Create IdentitySource which provides user sign in states and OAuth2 token
87 // service. 89 // service.
88 void CreateIdentitySource(); 90 void CreateIdentitySource();
89 91
90 // BlobImageSerializationProcessor::ErrorDelegate implementation. 92 // BlobImageSerializationProcessor::ErrorDelegate implementation.
91 void OnImageDecodeError() override; 93 void OnImageDecodeError() override;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 130
129 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; 131 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
130 132
131 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); 133 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);
132 }; 134 };
133 135
134 } // namespace client 136 } // namespace client
135 } // namespace blimp 137 } // namespace blimp
136 138
137 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ 139 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « blimp/client/core/BUILD.gn ('k') | blimp/client/core/blimp_client_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698