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

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

Issue 1830293003: Remove BlimpUiContextFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove blink/engine deps Created 4 years, 9 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 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
11 #include "blimp/common/create_blimp_message.h" 11 #include "blimp/common/create_blimp_message.h"
12 #include "blimp/common/proto/tab_control.pb.h" 12 #include "blimp/common/proto/tab_control.pb.h"
13 #include "blimp/engine/app/blimp_engine_config.h" 13 #include "blimp/engine/app/blimp_engine_config.h"
14 #include "blimp/engine/app/ui/blimp_layout_manager.h" 14 #include "blimp/engine/app/ui/blimp_layout_manager.h"
15 #include "blimp/engine/app/ui/blimp_screen.h" 15 #include "blimp/engine/app/ui/blimp_screen.h"
16 #include "blimp/engine/app/ui/blimp_ui_context_factory.h"
17 #include "blimp/engine/app/ui/blimp_window_tree_host.h" 16 #include "blimp/engine/app/ui/blimp_window_tree_host.h"
18 #include "blimp/engine/common/blimp_browser_context.h" 17 #include "blimp/engine/common/blimp_browser_context.h"
19 #include "blimp/net/blimp_connection.h" 18 #include "blimp/net/blimp_connection.h"
20 #include "blimp/net/blimp_message_multiplexer.h" 19 #include "blimp/net/blimp_message_multiplexer.h"
21 #include "blimp/net/blimp_message_thread_pipe.h" 20 #include "blimp/net/blimp_message_thread_pipe.h"
22 #include "blimp/net/browser_connection_handler.h" 21 #include "blimp/net/browser_connection_handler.h"
23 #include "blimp/net/common.h" 22 #include "blimp/net/common.h"
24 #include "blimp/net/engine_authentication_handler.h" 23 #include "blimp/net/engine_authentication_handler.h"
25 #include "blimp/net/engine_connection_manager.h" 24 #include "blimp/net/engine_connection_manager.h"
26 #include "blimp/net/null_blimp_message_processor.h" 25 #include "blimp/net/null_blimp_message_processor.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 199
201 // Safely delete network components on the IO thread. 200 // Safely delete network components on the IO thread.
202 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, 201 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE,
203 net_components_.release()); 202 net_components_.release());
204 } 203 }
205 204
206 void BlimpEngineSession::Initialize() { 205 void BlimpEngineSession::Initialize() {
207 DCHECK(!gfx::Screen::GetScreen()); 206 DCHECK(!gfx::Screen::GetScreen());
208 gfx::Screen::SetScreenInstance(screen_.get()); 207 gfx::Screen::SetScreenInstance(screen_.get());
209 208
210 context_factory_.reset(new BlimpUiContextFactory());
211 aura::Env::GetInstance()->set_context_factory(context_factory_.get());
212 window_tree_host_.reset(new BlimpWindowTreeHost()); 209 window_tree_host_.reset(new BlimpWindowTreeHost());
213 210
214 screen_->set_window_tree_host(window_tree_host_.get()); 211 screen_->set_window_tree_host(window_tree_host_.get());
215 window_tree_host_->InitHost(); 212 window_tree_host_->InitHost();
216 window_tree_host_->window()->SetLayoutManager( 213 window_tree_host_->window()->SetLayoutManager(
217 new BlimpLayoutManager(window_tree_host_->window())); 214 new BlimpLayoutManager(window_tree_host_->window()));
218 focus_client_.reset(new wm::FocusController(new FocusRulesImpl)); 215 focus_client_.reset(new wm::FocusController(new FocusRulesImpl));
219 aura::client::SetFocusClient(window_tree_host_->window(), 216 aura::client::SetFocusClient(window_tree_host_->window(),
220 focus_client_.get()); 217 focus_client_.get());
221 aura::client::SetActivationClient(window_tree_host_->window(), 218 aura::client::SetActivationClient(window_tree_host_->window(),
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 535
539 aura::Window* parent = window_tree_host_->window(); 536 aura::Window* parent = window_tree_host_->window();
540 aura::Window* content = web_contents_->GetNativeView(); 537 aura::Window* content = web_contents_->GetNativeView();
541 if (!parent->Contains(content)) 538 if (!parent->Contains(content))
542 parent->AddChild(content); 539 parent->AddChild(content);
543 content->Show(); 540 content->Show();
544 } 541 }
545 542
546 } // namespace engine 543 } // namespace engine
547 } // namespace blimp 544 } // 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