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

Side by Side Diff: ui/views/mus/native_widget_mus.cc

Issue 1647483002: views/mus: WindowTreeHostMus doesn't need to know about SurfaceType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 10 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 | « no previous file | ui/views/mus/window_tree_host_mus.h » ('j') | 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 "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "components/mus/public/cpp/property_type_converters.h" 9 #include "components/mus/public/cpp/property_type_converters.h"
10 #include "components/mus/public/cpp/window.h" 10 #include "components/mus/public/cpp/window.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // For Chrome, we need the GpuProcessTransportFactory so that renderer and 300 // For Chrome, we need the GpuProcessTransportFactory so that renderer and
301 // browser pixels are composited into a single backing 301 // browser pixels are composited into a single backing
302 // SoftwareOutputDeviceMus. 302 // SoftwareOutputDeviceMus.
303 if (!default_context_factory) { 303 if (!default_context_factory) {
304 if (!context_factory_) { 304 if (!context_factory_) {
305 context_factory_.reset(new SurfaceContextFactory(shell_, window_, 305 context_factory_.reset(new SurfaceContextFactory(shell_, window_,
306 surface_type_)); 306 surface_type_));
307 } 307 }
308 aura::Env::GetInstance()->set_context_factory(context_factory_.get()); 308 aura::Env::GetInstance()->set_context_factory(context_factory_.get());
309 } 309 }
310 window_tree_host_.reset( 310 window_tree_host_.reset(new WindowTreeHostMus(shell_, this, window_));
311 new WindowTreeHostMus(shell_, this, window_, surface_type_));
312 window_tree_host_->AddObserver(this); 311 window_tree_host_->AddObserver(this);
313 window_tree_host_->InitHost(); 312 window_tree_host_->InitHost();
314 aura::Env::GetInstance()->set_context_factory(default_context_factory); 313 aura::Env::GetInstance()->set_context_factory(default_context_factory);
315 window_tree_host_->window()->SetProperty(kMusWindow, window_); 314 window_tree_host_->window()->SetProperty(kMusWindow, window_);
316 315
317 focus_client_.reset(new wm::FocusController(new FocusRulesImpl)); 316 focus_client_.reset(new wm::FocusController(new FocusRulesImpl));
318 317
319 aura::client::SetFocusClient(window_tree_host_->window(), 318 aura::client::SetFocusClient(window_tree_host_->window(),
320 focus_client_.get()); 319 focus_client_.get());
321 aura::client::SetActivationClient(window_tree_host_->window(), 320 aura::client::SetActivationClient(window_tree_host_->window(),
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 848
850 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { 849 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) {
851 native_widget_delegate_->OnGestureEvent(event); 850 native_widget_delegate_->OnGestureEvent(event);
852 } 851 }
853 852
854 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { 853 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) {
855 GetWidget()->Close(); 854 GetWidget()->Close();
856 } 855 }
857 856
858 } // namespace views 857 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698