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

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

Issue 1842593002: [Blimp Engine] Adds a WindowTreeClient so that popup will have non-null paren… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_window_tree_client.h"
16 #include "blimp/engine/app/ui/blimp_window_tree_host.h" 17 #include "blimp/engine/app/ui/blimp_window_tree_host.h"
17 #include "blimp/engine/common/blimp_browser_context.h" 18 #include "blimp/engine/common/blimp_browser_context.h"
18 #include "blimp/net/blimp_connection.h" 19 #include "blimp/net/blimp_connection.h"
19 #include "blimp/net/blimp_message_multiplexer.h" 20 #include "blimp/net/blimp_message_multiplexer.h"
20 #include "blimp/net/blimp_message_thread_pipe.h" 21 #include "blimp/net/blimp_message_thread_pipe.h"
21 #include "blimp/net/browser_connection_handler.h" 22 #include "blimp/net/browser_connection_handler.h"
22 #include "blimp/net/common.h" 23 #include "blimp/net/common.h"
23 #include "blimp/net/engine_authentication_handler.h" 24 #include "blimp/net/engine_authentication_handler.h"
24 #include "blimp/net/engine_connection_manager.h" 25 #include "blimp/net/engine_connection_manager.h"
25 #include "blimp/net/null_blimp_message_processor.h" 26 #include "blimp/net/null_blimp_message_processor.h"
(...skipping 13 matching lines...) Expand all
39 #include "ui/aura/env.h" 40 #include "ui/aura/env.h"
40 #include "ui/aura/window.h" 41 #include "ui/aura/window.h"
41 #include "ui/aura/window_tree_host.h" 42 #include "ui/aura/window_tree_host.h"
42 #include "ui/base/ime/input_method.h" 43 #include "ui/base/ime/input_method.h"
43 #include "ui/base/ime/text_input_client.h" 44 #include "ui/base/ime/text_input_client.h"
44 #include "ui/gfx/geometry/size.h" 45 #include "ui/gfx/geometry/size.h"
45 #include "ui/wm/core/base_focus_rules.h" 46 #include "ui/wm/core/base_focus_rules.h"
46 #include "ui/wm/core/default_activation_client.h" 47 #include "ui/wm/core/default_activation_client.h"
47 #include "ui/wm/core/focus_controller.h" 48 #include "ui/wm/core/focus_controller.h"
48 49
49
50 namespace blimp { 50 namespace blimp {
51 namespace engine { 51 namespace engine {
52 namespace { 52 namespace {
53 53
54 const int kDummyTabId = 0; 54 const int kDummyTabId = 0;
55 const float kDefaultScaleFactor = 1.f; 55 const float kDefaultScaleFactor = 1.f;
56 const int kDefaultDisplayWidth = 800; 56 const int kDefaultDisplayWidth = 800;
57 const int kDefaultDisplayHeight = 600; 57 const int kDefaultDisplayHeight = 600;
58 const uint16_t kDefaultPort = 25467; 58 const uint16_t kDefaultPort = 25467;
59 59
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 window_tree_host_->window()->SetLayoutManager( 218 window_tree_host_->window()->SetLayoutManager(
219 new BlimpLayoutManager(window_tree_host_->window())); 219 new BlimpLayoutManager(window_tree_host_->window()));
220 focus_client_.reset(new wm::FocusController(new FocusRulesImpl)); 220 focus_client_.reset(new wm::FocusController(new FocusRulesImpl));
221 aura::client::SetFocusClient(window_tree_host_->window(), 221 aura::client::SetFocusClient(window_tree_host_->window(),
222 focus_client_.get()); 222 focus_client_.get());
223 aura::client::SetActivationClient(window_tree_host_->window(), 223 aura::client::SetActivationClient(window_tree_host_->window(),
224 focus_client_.get()); 224 focus_client_.get());
225 capture_client_.reset( 225 capture_client_.reset(
226 new aura::client::DefaultCaptureClient(window_tree_host_->window())); 226 new aura::client::DefaultCaptureClient(window_tree_host_->window()));
227 227
228 window_tree_client_.reset(
229 new BlimpWindowTreeClient(window_tree_host_->window()));
230
228 window_tree_host_->GetInputMethod()->AddObserver(this); 231 window_tree_host_->GetInputMethod()->AddObserver(this);
229 232
230 window_tree_host_->SetBounds(gfx::Rect(screen_->GetPrimaryDisplay().size())); 233 window_tree_host_->SetBounds(gfx::Rect(screen_->GetPrimaryDisplay().size()));
231 234
232 RegisterFeatures(); 235 RegisterFeatures();
233 236
234 // Initialize must only be posted after the RegisterFeature calls have 237 // Initialize must only be posted after the RegisterFeature calls have
235 // completed. 238 // completed.
236 content::BrowserThread::PostTask( 239 content::BrowserThread::PostTask(
237 content::BrowserThread::IO, FROM_HERE, 240 content::BrowserThread::IO, FROM_HERE,
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 594
592 aura::Window* parent = window_tree_host_->window(); 595 aura::Window* parent = window_tree_host_->window();
593 aura::Window* content = web_contents_->GetNativeView(); 596 aura::Window* content = web_contents_->GetNativeView();
594 if (!parent->Contains(content)) 597 if (!parent->Contains(content))
595 parent->AddChild(content); 598 parent->AddChild(content);
596 content->Show(); 599 content->Show();
597 } 600 }
598 601
599 } // namespace engine 602 } // namespace engine
600 } // namespace blimp 603 } // 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