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

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: Addresses kmarshall's #3 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 #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_connection_statistics.h" 31 #include "blimp/net/blimp_connection_statistics.h"
31 #include "blimp/net/blimp_message_multiplexer.h" 32 #include "blimp/net/blimp_message_multiplexer.h"
32 #include "blimp/net/blimp_message_thread_pipe.h" 33 #include "blimp/net/blimp_message_thread_pipe.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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 kDefaultScaleFactor, 235 kDefaultScaleFactor,
235 gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight)); 236 gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight));
236 render_widget_feature_.SetDelegate(kDummyTabId, this); 237 render_widget_feature_.SetDelegate(kDummyTabId, this);
237 238
238 std::unique_ptr<HeliumBlobSenderDelegate> helium_blob_delegate( 239 std::unique_ptr<HeliumBlobSenderDelegate> helium_blob_delegate(
239 new HeliumBlobSenderDelegate); 240 new HeliumBlobSenderDelegate);
240 blob_delegate_ = helium_blob_delegate.get(); 241 blob_delegate_ = helium_blob_delegate.get();
241 blob_channel_sender_ = base::WrapUnique( 242 blob_channel_sender_ = base::WrapUnique(
242 new BlobChannelSenderImpl(base::WrapUnique(new InMemoryBlobCache), 243 new BlobChannelSenderImpl(base::WrapUnique(new InMemoryBlobCache),
243 std::move(helium_blob_delegate))); 244 std::move(helium_blob_delegate)));
244 245 blob_channel_service_ =
246 base::MakeUnique<BlobChannelService>(blob_channel_sender_.get());
245 content::GeolocationProvider::SetGeolocationDelegate( 247 content::GeolocationProvider::SetGeolocationDelegate(
246 geolocation_feature_.CreateGeolocationDelegate()); 248 geolocation_feature_.CreateGeolocationDelegate());
247 } 249 }
248 250
249 BlimpEngineSession::~BlimpEngineSession() { 251 BlimpEngineSession::~BlimpEngineSession() {
250 render_widget_feature_.RemoveDelegate(kDummyTabId); 252 render_widget_feature_.RemoveDelegate(kDummyTabId);
251 253
252 window_tree_host_->GetInputMethod()->RemoveObserver(this); 254 window_tree_host_->GetInputMethod()->RemoveObserver(this);
253 255
254 // Ensure that all tabs are torn down first, since teardown will 256 // Ensure that all tabs are torn down first, since teardown will
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 parent->AddChild(content); 574 parent->AddChild(content);
573 content->Show(); 575 content->Show();
574 576
575 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id, 577 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id,
576 &render_widget_feature_, 578 &render_widget_feature_,
577 navigation_message_sender_.get())); 579 navigation_message_sender_.get()));
578 } 580 }
579 581
580 } // namespace engine 582 } // namespace engine
581 } // namespace blimp 583 } // namespace blimp
OLDNEW
« blimp/engine/mojo/blob_channel_service.h ('K') | « 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