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

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

Issue 2463423002: Add Settings[, Oberser] java code and JNI bridge. (Closed)
Patch Set: nits and sync to head Created 4 years, 1 month 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 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_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 5 #ifndef BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
6 #define BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 6 #define BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public NetworkEventObserver { 49 public NetworkEventObserver {
50 public: 50 public:
51 // The |io_thread_task_runner| must be the task runner to use for IO 51 // The |io_thread_task_runner| must be the task runner to use for IO
52 // operations. 52 // operations.
53 // The |file_thread_task_runner| must be the task runner to use for file 53 // The |file_thread_task_runner| must be the task runner to use for file
54 // operations. 54 // operations.
55 BlimpClientContextImpl( 55 BlimpClientContextImpl(
56 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 56 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
57 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 57 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
58 std::unique_ptr<CompositorDependencies> compositor_dependencies, 58 std::unique_ptr<CompositorDependencies> compositor_dependencies,
59 PrefService* local_state); 59 std::unique_ptr<Settings> settings);
60 ~BlimpClientContextImpl() override; 60 ~BlimpClientContextImpl() override;
61 61
62 // BlimpClientContext implementation. 62 // BlimpClientContext implementation.
63 void SetDelegate(BlimpClientContextDelegate* delegate) override; 63 void SetDelegate(BlimpClientContextDelegate* delegate) override;
64 std::unique_ptr<BlimpContents> CreateBlimpContents( 64 std::unique_ptr<BlimpContents> CreateBlimpContents(
65 gfx::NativeWindow window) override; 65 gfx::NativeWindow window) override;
66 void Connect() override; 66 void Connect() override;
67 void ConnectWithAssignment(const Assignment& assignment) override; 67 void ConnectWithAssignment(const Assignment& assignment) override;
68 68
69 // Creates a data object containing data about Blimp to be used for feedback. 69 // Creates a data object containing data about Blimp to be used for feedback.
70 std::unordered_map<std::string, std::string> CreateFeedbackData(); 70 std::unordered_map<std::string, std::string> CreateFeedbackData();
71 71
72 protected: 72 protected:
73 // Returns the URL to use for connections to the assigner. Used to construct 73 // Returns the URL to use for connections to the assigner. Used to construct
74 // the AssignmentSource. 74 // the AssignmentSource.
75 virtual GURL GetAssignerURL(); 75 virtual GURL GetAssignerURL();
76 76
77 // BlimpSettingsDelegate implementation. 77 // BlimpSettingsDelegate implementation.
78 IdentitySource* GetIdentitySource() override; 78 IdentitySource* GetIdentitySource() override;
79 ConnectionStatus* GetConnectionStatus() override; 79 ConnectionStatus* GetConnectionStatus() override;
80 80
81 Settings* settings() { return settings_.get(); }
82
81 private: 83 private:
82 // Called when the AssignmentSource is finished getting an Assignment. Will 84 // Called when the AssignmentSource is finished getting an Assignment. Will
83 // then call |ConnectWithAssignment| to initiate the actual connection. 85 // then call |ConnectWithAssignment| to initiate the actual connection.
84 virtual void OnAssignmentReceived(AssignmentRequestResult result, 86 virtual void OnAssignmentReceived(AssignmentRequestResult result,
85 const Assignment& assignment); 87 const Assignment& assignment);
86 88
87 void RegisterFeatures(); 89 void RegisterFeatures();
88 void InitializeSettings(); 90 void InitializeSettings();
89 91
90 // Terminates the active connection held by |net_connections_|. 92 // Terminates the active connection held by |net_connections_|.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 140
139 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; 141 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
140 142
141 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); 143 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);
142 }; 144 };
143 145
144 } // namespace client 146 } // namespace client
145 } // namespace blimp 147 } // namespace blimp
146 148
147 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 149 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698