OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 5 #ifndef BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ |
6 #define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 6 #define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "blimp/common/proto/blimp_message.pb.h" | 14 #include "blimp/common/proto/blimp_message.pb.h" |
15 #include "blimp/engine/feature/engine_render_widget_feature.h" | 15 #include "blimp/engine/feature/engine_render_widget_feature.h" |
16 #include "blimp/engine/feature/engine_settings_feature.h" | 16 #include "blimp/engine/feature/engine_settings_feature.h" |
17 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h" | |
17 #include "blimp/net/blimp_message_processor.h" | 18 #include "blimp/net/blimp_message_processor.h" |
18 #include "blimp/net/connection_error_observer.h" | 19 #include "blimp/net/connection_error_observer.h" |
19 #include "content/public/browser/invalidate_type.h" | 20 #include "content/public/browser/invalidate_type.h" |
20 #include "content/public/browser/web_contents_delegate.h" | 21 #include "content/public/browser/web_contents_delegate.h" |
21 #include "net/base/completion_callback.h" | 22 #include "net/base/completion_callback.h" |
22 #include "ui/base/ime/input_method_observer.h" | 23 #include "ui/base/ime/input_method_observer.h" |
23 #include "ui/gfx/geometry/size.h" | 24 #include "ui/gfx/geometry/size.h" |
24 | 25 |
25 namespace aura { | 26 namespace aura { |
26 class WindowTreeHost; | 27 class WindowTreeHost; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 // values for e.g. screen size pending real values being supplied by the | 89 // values for e.g. screen size pending real values being supplied by the |
89 // client. | 90 // client. |
90 void Initialize(); | 91 void Initialize(); |
91 | 92 |
92 BlimpBrowserContext* browser_context() { return browser_context_.get(); } | 93 BlimpBrowserContext* browser_context() { return browser_context_.get(); } |
93 | 94 |
94 BlobChannelSender* blob_channel_sender() { | 95 BlobChannelSender* blob_channel_sender() { |
95 return blob_channel_sender_.get(); | 96 return blob_channel_sender_.get(); |
96 } | 97 } |
97 | 98 |
99 // Returns a pointer to the Geolocation feature. | |
Kevin M
2016/07/19 16:01:42
nit: comment is superfluous
CJ
2016/07/19 20:35:58
Done.
| |
100 EngineGeolocationFeature* GetGeolocationFeature(); | |
101 | |
98 // Gets Engine's listening port. Invokes callback with the allocated port. | 102 // Gets Engine's listening port. Invokes callback with the allocated port. |
99 void GetEnginePortForTesting(const GetPortCallback& callback); | 103 void GetEnginePortForTesting(const GetPortCallback& callback); |
100 | 104 |
101 // BlimpMessageProcessor implementation. | 105 // BlimpMessageProcessor implementation. |
102 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. | 106 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. |
103 void ProcessMessage(std::unique_ptr<BlimpMessage> message, | 107 void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
104 const net::CompletionCallback& callback) override; | 108 const net::CompletionCallback& callback) override; |
105 | 109 |
106 private: | 110 private: |
107 // Creates ThreadPipeManager, registers features, and then starts to accept | 111 // Creates ThreadPipeManager, registers features, and then starts to accept |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 // including INPUT, COMPOSITOR and RENDER_WIDGET messages. | 201 // including INPUT, COMPOSITOR and RENDER_WIDGET messages. |
198 EngineRenderWidgetFeature render_widget_feature_; | 202 EngineRenderWidgetFeature render_widget_feature_; |
199 | 203 |
200 // Sends outgoing blob data as BlimpMessages. | 204 // Sends outgoing blob data as BlimpMessages. |
201 HeliumBlobSenderDelegate* blob_delegate_; | 205 HeliumBlobSenderDelegate* blob_delegate_; |
202 | 206 |
203 // Receives image data from the renderer and sends it to the client via | 207 // Receives image data from the renderer and sends it to the client via |
204 // |blob_delegate_|. | 208 // |blob_delegate_|. |
205 std::unique_ptr<BlobChannelSender> blob_channel_sender_; | 209 std::unique_ptr<BlobChannelSender> blob_channel_sender_; |
206 | 210 |
211 // Handles all incoming and outgoing messages related to Geolocation. | |
212 EngineGeolocationFeature geolocation_feature_; | |
213 | |
207 // Container for connection manager, authentication handler, and | 214 // Container for connection manager, authentication handler, and |
208 // browser connection handler. The components run on the I/O thread, and | 215 // browser connection handler. The components run on the I/O thread, and |
209 // this object is destroyed there. | 216 // this object is destroyed there. |
210 std::unique_ptr<EngineNetworkComponents> net_components_; | 217 std::unique_ptr<EngineNetworkComponents> net_components_; |
211 | 218 |
212 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; | 219 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; |
213 | 220 |
214 // Used to send TAB_CONTROL or NAVIGATION messages to client. | 221 // Used to send TAB_CONTROL or NAVIGATION messages to client. |
215 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; | 222 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; |
216 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; | 223 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; |
217 | 224 |
218 // TODO(haibinlu): Support more than one tab (crbug/547231) | 225 // TODO(haibinlu): Support more than one tab (crbug/547231) |
219 std::unique_ptr<Tab> tab_; | 226 std::unique_ptr<Tab> tab_; |
220 | 227 |
221 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 228 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); |
222 }; | 229 }; |
223 | 230 |
224 } // namespace engine | 231 } // namespace engine |
225 } // namespace blimp | 232 } // namespace blimp |
226 | 233 |
227 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 234 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ |
OLD | NEW |