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

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: Update comments. 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
104 EngineGeolocationFeature* GetGeolocationFeature();
Kevin M 2016/07/28 18:14:47 What's this doing here? :)
CJ 2016/07/28 19:54:15 I screwed up merging I think. Fixing.
105
99 // Gets Engine's listening port. Invokes callback with the allocated port. 106 // Gets Engine's listening port. Invokes callback with the allocated port.
100 void GetEnginePortForTesting(const GetPortCallback& callback); 107 void GetEnginePortForTesting(const GetPortCallback& callback);
101 108
102 // BlimpMessageProcessor implementation. 109 // BlimpMessageProcessor implementation.
103 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. 110 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly.
104 void ProcessMessage(std::unique_ptr<BlimpMessage> message, 111 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
105 const net::CompletionCallback& callback) override; 112 const net::CompletionCallback& callback) override;
106 113
107 private: 114 private:
108 // Creates ThreadPipeManager, registers features, and then starts to accept 115 // 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. 201 // Handles all incoming messages for type SETTINGS.
195 EngineSettingsFeature settings_feature_; 202 EngineSettingsFeature settings_feature_;
196 203
197 // Handles all incoming and outgoing messages related to RenderWidget, 204 // Handles all incoming and outgoing messages related to RenderWidget,
198 // including INPUT, COMPOSITOR and RENDER_WIDGET messages. 205 // including INPUT, COMPOSITOR and RENDER_WIDGET messages.
199 EngineRenderWidgetFeature render_widget_feature_; 206 EngineRenderWidgetFeature render_widget_feature_;
200 207
201 // Sends outgoing blob data as BlimpMessages. 208 // Sends outgoing blob data as BlimpMessages.
202 HeliumBlobSenderDelegate* blob_delegate_; 209 HeliumBlobSenderDelegate* blob_delegate_;
203 210
204 // Receives image data from the renderer and sends it to the client via 211 // Receives image data sends it to the client via
Kevin M 2016/07/28 18:14:47 Doesn't parse?
CJ 2016/07/28 19:54:15 Not sure what you mean. Are you saying that I some
Kevin M 2016/07/28 20:59:17 As in the sentence has two disjoint phrases that d
CJ 2016/07/28 22:47:05 Done.
205 // |blob_delegate_|. 212 // |blob_delegate_|.
206 std::unique_ptr<BlobChannelSender> blob_channel_sender_; 213 std::unique_ptr<BlobChannelSender> blob_channel_sender_;
207 214
215 // Receives image data from the renderer and sends it to
216 // |blob_channel_sender_|.
217 std::unique_ptr<BlobChannelService> blob_channel_service_;
218
208 // Handles all incoming and outgoing messages related to Geolocation. 219 // Handles all incoming and outgoing messages related to Geolocation.
209 EngineGeolocationFeature geolocation_feature_; 220 EngineGeolocationFeature geolocation_feature_;
210 221
211 // Container for connection manager, authentication handler, and 222 // Container for connection manager, authentication handler, and
212 // browser connection handler. The components run on the I/O thread, and 223 // browser connection handler. The components run on the I/O thread, and
213 // this object is destroyed there. 224 // this object is destroyed there.
214 std::unique_ptr<EngineNetworkComponents> net_components_; 225 std::unique_ptr<EngineNetworkComponents> net_components_;
215 226
216 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; 227 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
217 228
218 // Used to send TAB_CONTROL or NAVIGATION messages to client. 229 // Used to send TAB_CONTROL or NAVIGATION messages to client.
219 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; 230 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_;
220 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; 231 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_;
221 232
222 // TODO(haibinlu): Support more than one tab (crbug/547231) 233 // TODO(haibinlu): Support more than one tab (crbug/547231)
223 std::unique_ptr<Tab> tab_; 234 std::unique_ptr<Tab> tab_;
224 235
225 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 236 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
226 }; 237 };
227 238
228 } // namespace engine 239 } // namespace engine
229 } // namespace blimp 240 } // namespace blimp
230 241
231 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 242 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698