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" |
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_parenting_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/mojo/blob_channel_service.h" |
29 #include "blimp/engine/session/tab.h" | 29 #include "blimp/engine/session/tab.h" |
30 #include "blimp/net/blimp_connection.h" | 30 #include "blimp/net/blimp_connection.h" |
31 #include "blimp/net/blimp_message_multiplexer.h" | 31 #include "blimp/net/blimp_message_multiplexer.h" |
32 #include "blimp/net/blimp_message_thread_pipe.h" | 32 #include "blimp/net/blimp_message_thread_pipe.h" |
33 #include "blimp/net/blimp_stats.h" | 33 #include "blimp/net/blimp_stats.h" |
34 #include "blimp/net/blob_channel/blob_channel_sender_impl.h" | 34 #include "blimp/net/blob_channel/blob_channel_sender_impl.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 window_tree_host_->window()->SetLayoutManager( | 274 window_tree_host_->window()->SetLayoutManager( |
275 new BlimpLayoutManager(window_tree_host_->window())); | 275 new BlimpLayoutManager(window_tree_host_->window())); |
276 focus_client_.reset(new wm::FocusController(new FocusRulesImpl)); | 276 focus_client_.reset(new wm::FocusController(new FocusRulesImpl)); |
277 aura::client::SetFocusClient(window_tree_host_->window(), | 277 aura::client::SetFocusClient(window_tree_host_->window(), |
278 focus_client_.get()); | 278 focus_client_.get()); |
279 aura::client::SetActivationClient(window_tree_host_->window(), | 279 aura::client::SetActivationClient(window_tree_host_->window(), |
280 focus_client_.get()); | 280 focus_client_.get()); |
281 capture_client_.reset( | 281 capture_client_.reset( |
282 new aura::client::DefaultCaptureClient(window_tree_host_->window())); | 282 new aura::client::DefaultCaptureClient(window_tree_host_->window())); |
283 | 283 |
284 window_tree_client_.reset( | 284 window_parenting_client_.reset( |
285 new BlimpWindowTreeClient(window_tree_host_->window())); | 285 new BlimpWindowParentingClient(window_tree_host_->window())); |
286 | 286 |
287 window_tree_host_->GetInputMethod()->AddObserver(this); | 287 window_tree_host_->GetInputMethod()->AddObserver(this); |
288 | 288 |
289 window_tree_host_->SetBounds(gfx::Rect(screen_->GetPrimaryDisplay().size())); | 289 window_tree_host_->SetBounds(gfx::Rect(screen_->GetPrimaryDisplay().size())); |
290 | 290 |
291 RegisterFeatures(); | 291 RegisterFeatures(); |
292 | 292 |
293 // Initialize must only be posted after the RegisterFeature calls have | 293 // Initialize must only be posted after the RegisterFeature calls have |
294 // completed. | 294 // completed. |
295 content::BrowserThread::PostTask( | 295 content::BrowserThread::PostTask( |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 parent->AddChild(content); | 566 parent->AddChild(content); |
567 content->Show(); | 567 content->Show(); |
568 | 568 |
569 tab_ = base::MakeUnique<Tab>(std::move(new_contents), target_tab_id, | 569 tab_ = base::MakeUnique<Tab>(std::move(new_contents), target_tab_id, |
570 &render_widget_feature_, | 570 &render_widget_feature_, |
571 navigation_message_sender_.get()); | 571 navigation_message_sender_.get()); |
572 } | 572 } |
573 | 573 |
574 } // namespace engine | 574 } // namespace engine |
575 } // namespace blimp | 575 } // namespace blimp |
OLD | NEW |