| 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> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 namespace wm { | 48 namespace wm { |
| 49 class FocusController; | 49 class FocusController; |
| 50 } | 50 } |
| 51 | 51 |
| 52 namespace blimp { | 52 namespace blimp { |
| 53 | 53 |
| 54 class BlimpConnection; | 54 class BlimpConnection; |
| 55 class BlimpMessage; | 55 class BlimpMessage; |
| 56 class BlimpMessageThreadPipe; | 56 class BlimpMessageThreadPipe; |
| 57 class BlobCache; |
| 58 class BlobChannelSender; |
| 59 class HeliumBlobSenderDelegate; |
| 57 class ThreadPipeManager; | 60 class ThreadPipeManager; |
| 58 class SettingsManager; | 61 class SettingsManager; |
| 59 | 62 |
| 60 namespace engine { | 63 namespace engine { |
| 61 | 64 |
| 62 class BlimpBrowserContext; | 65 class BlimpBrowserContext; |
| 63 class BlimpEngineConfig; | 66 class BlimpEngineConfig; |
| 64 class BlimpFocusClient; | 67 class BlimpFocusClient; |
| 65 class BlimpScreen; | 68 class BlimpScreen; |
| 66 class BlimpWindowTreeHost; | 69 class BlimpWindowTreeHost; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 81 SettingsManager* settings_manager); | 84 SettingsManager* settings_manager); |
| 82 ~BlimpEngineSession() override; | 85 ~BlimpEngineSession() override; |
| 83 | 86 |
| 84 // Starts the network stack on the IO thread, and sets default placeholder | 87 // Starts the network stack on the IO thread, and sets default placeholder |
| 85 // values for e.g. screen size pending real values being supplied by the | 88 // values for e.g. screen size pending real values being supplied by the |
| 86 // client. | 89 // client. |
| 87 void Initialize(); | 90 void Initialize(); |
| 88 | 91 |
| 89 BlimpBrowserContext* browser_context() { return browser_context_.get(); } | 92 BlimpBrowserContext* browser_context() { return browser_context_.get(); } |
| 90 | 93 |
| 94 BlobChannelSender* blob_channel_sender() { |
| 95 return blob_channel_sender_.get(); |
| 96 } |
| 97 |
| 91 // Gets Engine's listening port. Invokes callback with the allocated port. | 98 // Gets Engine's listening port. Invokes callback with the allocated port. |
| 92 void GetEnginePortForTesting(const GetPortCallback& callback); | 99 void GetEnginePortForTesting(const GetPortCallback& callback); |
| 93 | 100 |
| 94 // BlimpMessageProcessor implementation. | 101 // BlimpMessageProcessor implementation. |
| 95 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. | 102 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. |
| 96 void ProcessMessage(std::unique_ptr<BlimpMessage> message, | 103 void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
| 97 const net::CompletionCallback& callback) override; | 104 const net::CompletionCallback& callback) override; |
| 98 | 105 |
| 99 private: | 106 private: |
| 100 // Creates ThreadPipeManager, registers features, and then starts to accept | 107 // Creates ThreadPipeManager, registers features, and then starts to accept |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // Manages all global settings for the engine session. | 190 // Manages all global settings for the engine session. |
| 184 SettingsManager* settings_manager_; | 191 SettingsManager* settings_manager_; |
| 185 | 192 |
| 186 // Handles all incoming messages for type SETTINGS. | 193 // Handles all incoming messages for type SETTINGS. |
| 187 EngineSettingsFeature settings_feature_; | 194 EngineSettingsFeature settings_feature_; |
| 188 | 195 |
| 189 // Handles all incoming and outgoing messages related to RenderWidget, | 196 // Handles all incoming and outgoing messages related to RenderWidget, |
| 190 // including INPUT, COMPOSITOR and RENDER_WIDGET messages. | 197 // including INPUT, COMPOSITOR and RENDER_WIDGET messages. |
| 191 EngineRenderWidgetFeature render_widget_feature_; | 198 EngineRenderWidgetFeature render_widget_feature_; |
| 192 | 199 |
| 200 // Sends outgoing blob data as BlimpMessages. |
| 201 HeliumBlobSenderDelegate* blob_delegate_; |
| 202 |
| 203 // Receives image data from the renderer and sends it to the client via |
| 204 // |blob_delegate_|. |
| 205 std::unique_ptr<BlobChannelSender> blob_channel_sender_; |
| 206 |
| 193 // Container for connection manager, authentication handler, and | 207 // Container for connection manager, authentication handler, and |
| 194 // browser connection handler. The components run on the I/O thread, and | 208 // browser connection handler. The components run on the I/O thread, and |
| 195 // this object is destroyed there. | 209 // this object is destroyed there. |
| 196 std::unique_ptr<EngineNetworkComponents> net_components_; | 210 std::unique_ptr<EngineNetworkComponents> net_components_; |
| 197 | 211 |
| 198 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; | 212 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; |
| 199 | 213 |
| 200 // Used to send TAB_CONTROL or NAVIGATION messages to client. | 214 // Used to send TAB_CONTROL or NAVIGATION messages to client. |
| 201 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; | 215 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; |
| 202 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; | 216 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; |
| 203 | 217 |
| 204 // TODO(haibinlu): Support more than one tab (crbug/547231) | 218 // TODO(haibinlu): Support more than one tab (crbug/547231) |
| 205 std::unique_ptr<Tab> tab_; | 219 std::unique_ptr<Tab> tab_; |
| 206 | 220 |
| 207 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 221 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); |
| 208 }; | 222 }; |
| 209 | 223 |
| 210 } // namespace engine | 224 } // namespace engine |
| 211 } // namespace blimp | 225 } // namespace blimp |
| 212 | 226 |
| 213 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 227 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ |
| OLD | NEW |