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 #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" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "blimp/net/blob_channel/helium_blob_sender_delegate.h" | 34 #include "blimp/net/blob_channel/helium_blob_sender_delegate.h" |
35 #include "blimp/net/browser_connection_handler.h" | 35 #include "blimp/net/browser_connection_handler.h" |
36 #include "blimp/net/common.h" | 36 #include "blimp/net/common.h" |
37 #include "blimp/net/engine_authentication_handler.h" | 37 #include "blimp/net/engine_authentication_handler.h" |
38 #include "blimp/net/engine_connection_manager.h" | 38 #include "blimp/net/engine_connection_manager.h" |
39 #include "blimp/net/null_blimp_message_processor.h" | 39 #include "blimp/net/null_blimp_message_processor.h" |
40 #include "blimp/net/tcp_engine_transport.h" | 40 #include "blimp/net/tcp_engine_transport.h" |
41 #include "blimp/net/thread_pipe_manager.h" | 41 #include "blimp/net/thread_pipe_manager.h" |
42 #include "content/public/browser/browser_context.h" | 42 #include "content/public/browser/browser_context.h" |
43 #include "content/public/browser/browser_thread.h" | 43 #include "content/public/browser/browser_thread.h" |
44 #include "content/public/browser/geolocation_delegate.h" | |
45 #include "content/public/browser/geolocation_provider.h" | |
46 #include "content/public/browser/navigation_controller.h" | 44 #include "content/public/browser/navigation_controller.h" |
47 #include "content/public/browser/navigation_entry.h" | 45 #include "content/public/browser/navigation_entry.h" |
48 #include "content/public/browser/render_view_host.h" | 46 #include "content/public/browser/render_view_host.h" |
49 #include "content/public/browser/render_widget_host.h" | 47 #include "content/public/browser/render_widget_host.h" |
50 #include "content/public/browser/render_widget_host_view.h" | 48 #include "content/public/browser/render_widget_host_view.h" |
51 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
| 50 #include "device/geolocation/geolocation_delegate.h" |
| 51 #include "device/geolocation/geolocation_provider.h" |
52 #include "net/base/ip_address.h" | 52 #include "net/base/ip_address.h" |
53 #include "net/base/net_errors.h" | 53 #include "net/base/net_errors.h" |
54 #include "ui/aura/client/default_capture_client.h" | 54 #include "ui/aura/client/default_capture_client.h" |
55 #include "ui/aura/env.h" | 55 #include "ui/aura/env.h" |
56 #include "ui/aura/window.h" | 56 #include "ui/aura/window.h" |
57 #include "ui/aura/window_tree_host.h" | 57 #include "ui/aura/window_tree_host.h" |
58 #include "ui/base/ime/input_method.h" | 58 #include "ui/base/ime/input_method.h" |
59 #include "ui/base/ime/text_input_client.h" | 59 #include "ui/base/ime/text_input_client.h" |
60 #include "ui/gfx/geometry/size.h" | 60 #include "ui/gfx/geometry/size.h" |
61 #include "ui/wm/core/base_focus_rules.h" | 61 #include "ui/wm/core/base_focus_rules.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight)); | 235 gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight)); |
236 render_widget_feature_.SetDelegate(kDummyTabId, this); | 236 render_widget_feature_.SetDelegate(kDummyTabId, this); |
237 | 237 |
238 std::unique_ptr<HeliumBlobSenderDelegate> helium_blob_delegate( | 238 std::unique_ptr<HeliumBlobSenderDelegate> helium_blob_delegate( |
239 new HeliumBlobSenderDelegate); | 239 new HeliumBlobSenderDelegate); |
240 blob_delegate_ = helium_blob_delegate.get(); | 240 blob_delegate_ = helium_blob_delegate.get(); |
241 blob_channel_sender_ = base::WrapUnique( | 241 blob_channel_sender_ = base::WrapUnique( |
242 new BlobChannelSenderImpl(base::WrapUnique(new InMemoryBlobCache), | 242 new BlobChannelSenderImpl(base::WrapUnique(new InMemoryBlobCache), |
243 std::move(helium_blob_delegate))); | 243 std::move(helium_blob_delegate))); |
244 | 244 |
245 content::GeolocationProvider::SetGeolocationDelegate( | 245 device::GeolocationProvider::SetGeolocationDelegate( |
246 geolocation_feature_.CreateGeolocationDelegate()); | 246 geolocation_feature_.CreateGeolocationDelegate()); |
247 } | 247 } |
248 | 248 |
249 BlimpEngineSession::~BlimpEngineSession() { | 249 BlimpEngineSession::~BlimpEngineSession() { |
250 render_widget_feature_.RemoveDelegate(kDummyTabId); | 250 render_widget_feature_.RemoveDelegate(kDummyTabId); |
251 | 251 |
252 window_tree_host_->GetInputMethod()->RemoveObserver(this); | 252 window_tree_host_->GetInputMethod()->RemoveObserver(this); |
253 | 253 |
254 // Ensure that all tabs are torn down first, since teardown will | 254 // Ensure that all tabs are torn down first, since teardown will |
255 // trigger RenderViewDeleted callbacks to their observers, which will in turn | 255 // trigger RenderViewDeleted callbacks to their observers, which will in turn |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 parent->AddChild(content); | 572 parent->AddChild(content); |
573 content->Show(); | 573 content->Show(); |
574 | 574 |
575 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, |
576 &render_widget_feature_, | 576 &render_widget_feature_, |
577 navigation_message_sender_.get())); | 577 navigation_message_sender_.get())); |
578 } | 578 } |
579 | 579 |
580 } // namespace engine | 580 } // namespace engine |
581 } // namespace blimp | 581 } // namespace blimp |
OLD | NEW |