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

Side by Side Diff: blimp/engine/session/blimp_engine_session.h

Issue 2189503004: BlobChannelService is modified to be Mojo Service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into bcs Created 4 years, 4 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
OLDNEW
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/engine/feature/geolocation/engine_geolocation_feature.h"
18 #include "blimp/engine/mojo/blob_channel_service.h"
18 #include "blimp/net/blimp_message_processor.h" 19 #include "blimp/net/blimp_message_processor.h"
19 #include "blimp/net/connection_error_observer.h" 20 #include "blimp/net/connection_error_observer.h"
20 #include "content/public/browser/invalidate_type.h" 21 #include "content/public/browser/invalidate_type.h"
21 #include "content/public/browser/web_contents_delegate.h" 22 #include "content/public/browser/web_contents_delegate.h"
22 #include "net/base/completion_callback.h" 23 #include "net/base/completion_callback.h"
23 #include "ui/base/ime/input_method_observer.h" 24 #include "ui/base/ime/input_method_observer.h"
24 #include "ui/gfx/geometry/size.h" 25 #include "ui/gfx/geometry/size.h"
25 26
26 namespace aura { 27 namespace aura {
27 class WindowTreeHost; 28 class WindowTreeHost;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // values for e.g. screen size pending real values being supplied by the 90 // values for e.g. screen size pending real values being supplied by the
90 // client. 91 // client.
91 void Initialize(); 92 void Initialize();
92 93
93 BlimpBrowserContext* browser_context() { return browser_context_.get(); } 94 BlimpBrowserContext* browser_context() { return browser_context_.get(); }
94 95
95 BlobChannelSender* blob_channel_sender() { 96 BlobChannelSender* blob_channel_sender() {
96 return blob_channel_sender_.get(); 97 return blob_channel_sender_.get();
97 } 98 }
98 99
100 BlobChannelService* blob_channel_service() {
101 return blob_channel_service_.get();
102 }
103
99 // Gets Engine's listening port. Invokes callback with the allocated port. 104 // Gets Engine's listening port. Invokes callback with the allocated port.
100 void GetEnginePortForTesting(const GetPortCallback& callback); 105 void GetEnginePortForTesting(const GetPortCallback& callback);
101 106
102 // BlimpMessageProcessor implementation. 107 // BlimpMessageProcessor implementation.
103 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. 108 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly.
104 void ProcessMessage(std::unique_ptr<BlimpMessage> message, 109 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
105 const net::CompletionCallback& callback) override; 110 const net::CompletionCallback& callback) override;
106 111
107 private: 112 private:
108 // Creates ThreadPipeManager, registers features, and then starts to accept 113 // Creates ThreadPipeManager, registers features, and then starts to accept
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Handles all incoming messages for type SETTINGS. 199 // Handles all incoming messages for type SETTINGS.
195 EngineSettingsFeature settings_feature_; 200 EngineSettingsFeature settings_feature_;
196 201
197 // Handles all incoming and outgoing messages related to RenderWidget, 202 // Handles all incoming and outgoing messages related to RenderWidget,
198 // including INPUT, COMPOSITOR and RENDER_WIDGET messages. 203 // including INPUT, COMPOSITOR and RENDER_WIDGET messages.
199 EngineRenderWidgetFeature render_widget_feature_; 204 EngineRenderWidgetFeature render_widget_feature_;
200 205
201 // Sends outgoing blob data as BlimpMessages. 206 // Sends outgoing blob data as BlimpMessages.
202 HeliumBlobSenderDelegate* blob_delegate_; 207 HeliumBlobSenderDelegate* blob_delegate_;
203 208
204 // Receives image data from the renderer and sends it to the client via 209 // Receives image data and sends it to the client via
205 // |blob_delegate_|. 210 // |blob_delegate_|.
206 std::unique_ptr<BlobChannelSender> blob_channel_sender_; 211 std::unique_ptr<BlobChannelSender> blob_channel_sender_;
207 212
213 // Receives image data from the renderer and sends it to
214 // |blob_channel_sender_|.
215 std::unique_ptr<BlobChannelService> blob_channel_service_;
216
208 // Handles all incoming and outgoing messages related to Geolocation. 217 // Handles all incoming and outgoing messages related to Geolocation.
209 EngineGeolocationFeature geolocation_feature_; 218 EngineGeolocationFeature geolocation_feature_;
210 219
211 // Container for connection manager, authentication handler, and 220 // Container for connection manager, authentication handler, and
212 // browser connection handler. The components run on the I/O thread, and 221 // browser connection handler. The components run on the I/O thread, and
213 // this object is destroyed there. 222 // this object is destroyed there.
214 std::unique_ptr<EngineNetworkComponents> net_components_; 223 std::unique_ptr<EngineNetworkComponents> net_components_;
215 224
216 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; 225 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
217 226
218 // Used to send TAB_CONTROL or NAVIGATION messages to client. 227 // Used to send TAB_CONTROL or NAVIGATION messages to client.
219 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; 228 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_;
220 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; 229 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_;
221 230
222 // TODO(haibinlu): Support more than one tab (crbug/547231) 231 // TODO(haibinlu): Support more than one tab (crbug/547231)
223 std::unique_ptr<Tab> tab_; 232 std::unique_ptr<Tab> tab_;
224 233
225 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 234 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
226 }; 235 };
227 236
228 } // namespace engine 237 } // namespace engine
229 } // namespace blimp 238 } // namespace blimp
230 239
231 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 240 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
OLDNEW
« no previous file with comments | « blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc ('k') | blimp/engine/session/blimp_engine_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698