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

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

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
« no previous file with comments | « blimp/engine/session/blimp_engine_session.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "blimp/engine/session/blimp_engine_session.h" 5 #include "blimp/engine/session/blimp_engine_session.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "base/trace_event/trace_event.h" 15 #include "base/trace_event/trace_event.h"
16 #include "blimp/common/blob_cache/in_memory_blob_cache.h" 16 #include "blimp/common/blob_cache/in_memory_blob_cache.h"
17 #include "blimp/common/create_blimp_message.h" 17 #include "blimp/common/create_blimp_message.h"
18 #include "blimp/common/proto/tab_control.pb.h" 18 #include "blimp/common/proto/tab_control.pb.h"
19 #include "blimp/engine/app/blimp_engine_config.h" 19 #include "blimp/engine/app/blimp_engine_config.h"
20 #include "blimp/engine/app/settings_manager.h" 20 #include "blimp/engine/app/settings_manager.h"
21 #include "blimp/engine/app/switches.h" 21 #include "blimp/engine/app/switches.h"
22 #include "blimp/engine/app/ui/blimp_layout_manager.h" 22 #include "blimp/engine/app/ui/blimp_layout_manager.h"
23 #include "blimp/engine/app/ui/blimp_screen.h" 23 #include "blimp/engine/app/ui/blimp_screen.h"
24 #include "blimp/engine/app/ui/blimp_window_tree_client.h" 24 #include "blimp/engine/app/ui/blimp_window_tree_client.h"
25 #include "blimp/engine/app/ui/blimp_window_tree_host.h" 25 #include "blimp/engine/app/ui/blimp_window_tree_host.h"
26 #include "blimp/engine/common/blimp_browser_context.h" 26 #include "blimp/engine/common/blimp_browser_context.h"
27 #include "blimp/engine/common/blimp_user_agent.h" 27 #include "blimp/engine/common/blimp_user_agent.h"
28 #include "blimp/engine/mojo/blob_channel_service.h"
28 #include "blimp/engine/session/tab.h" 29 #include "blimp/engine/session/tab.h"
29 #include "blimp/net/blimp_connection.h" 30 #include "blimp/net/blimp_connection.h"
30 #include "blimp/net/blimp_message_multiplexer.h" 31 #include "blimp/net/blimp_message_multiplexer.h"
31 #include "blimp/net/blimp_message_thread_pipe.h" 32 #include "blimp/net/blimp_message_thread_pipe.h"
32 #include "blimp/net/blimp_stats.h" 33 #include "blimp/net/blimp_stats.h"
33 #include "blimp/net/blob_channel/blob_channel_sender_impl.h" 34 #include "blimp/net/blob_channel/blob_channel_sender_impl.h"
34 #include "blimp/net/blob_channel/helium_blob_sender_delegate.h" 35 #include "blimp/net/blob_channel/helium_blob_sender_delegate.h"
35 #include "blimp/net/browser_connection_handler.h" 36 #include "blimp/net/browser_connection_handler.h"
36 #include "blimp/net/common.h" 37 #include "blimp/net/common.h"
37 #include "blimp/net/engine_authentication_handler.h" 38 #include "blimp/net/engine_authentication_handler.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 kDefaultScaleFactor, 233 kDefaultScaleFactor,
233 gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight)); 234 gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight));
234 render_widget_feature_.SetDelegate(kDummyTabId, this); 235 render_widget_feature_.SetDelegate(kDummyTabId, this);
235 236
236 std::unique_ptr<HeliumBlobSenderDelegate> helium_blob_delegate( 237 std::unique_ptr<HeliumBlobSenderDelegate> helium_blob_delegate(
237 new HeliumBlobSenderDelegate); 238 new HeliumBlobSenderDelegate);
238 blob_delegate_ = helium_blob_delegate.get(); 239 blob_delegate_ = helium_blob_delegate.get();
239 blob_channel_sender_ = base::WrapUnique( 240 blob_channel_sender_ = base::WrapUnique(
240 new BlobChannelSenderImpl(base::WrapUnique(new InMemoryBlobCache), 241 new BlobChannelSenderImpl(base::WrapUnique(new InMemoryBlobCache),
241 std::move(helium_blob_delegate))); 242 std::move(helium_blob_delegate)));
242 243 blob_channel_service_ =
244 base::MakeUnique<BlobChannelService>(blob_channel_sender_.get());
243 device::GeolocationProvider::SetGeolocationDelegate( 245 device::GeolocationProvider::SetGeolocationDelegate(
244 geolocation_feature_.CreateGeolocationDelegate()); 246 geolocation_feature_.CreateGeolocationDelegate());
245 } 247 }
246 248
247 BlimpEngineSession::~BlimpEngineSession() { 249 BlimpEngineSession::~BlimpEngineSession() {
248 render_widget_feature_.RemoveDelegate(kDummyTabId); 250 render_widget_feature_.RemoveDelegate(kDummyTabId);
249 251
250 window_tree_host_->GetInputMethod()->RemoveObserver(this); 252 window_tree_host_->GetInputMethod()->RemoveObserver(this);
251 253
252 // Ensure that all tabs are torn down first, since teardown will 254 // Ensure that all tabs are torn down first, since teardown will
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 parent->AddChild(content); 572 parent->AddChild(content);
571 content->Show(); 573 content->Show();
572 574
573 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id, 575 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id,
574 &render_widget_feature_, 576 &render_widget_feature_,
575 navigation_message_sender_.get())); 577 navigation_message_sender_.get()));
576 } 578 }
577 579
578 } // namespace engine 580 } // namespace engine
579 } // namespace blimp 581 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/session/blimp_engine_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698