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

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

Issue 2341483004: Fix event dispatching and window resizing in high-dpi mode. (Closed)
Patch Set: remove client area changes Created 4 years, 2 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
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/window_tree_host_mus.h" 5 #include "ui/views/mus/window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "services/ui/public/cpp/window.h" 8 #include "services/ui/public/cpp/window.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
(...skipping 29 matching lines...) Expand all
40 40
41 SetPlatformWindow(base::MakeUnique<ui::StubWindow>( 41 SetPlatformWindow(base::MakeUnique<ui::StubWindow>(
42 this, 42 this,
43 false)); // Do not advertise accelerated widget; already set manually. 43 false)); // Do not advertise accelerated widget; already set manually.
44 44
45 compositor()->SetWindow(window); 45 compositor()->SetWindow(window);
46 46
47 // Initialize the stub platform window bounds to those of the ui::Window. 47 // Initialize the stub platform window bounds to those of the ui::Window.
48 platform_window()->SetBounds(window->bounds()); 48 platform_window()->SetBounds(window->bounds());
49 49
50 // The location of events is already transformed, and there is no way to
51 // correctly determine the reverse transform. So, don't attempt to transform
52 // event locations, else the root location is wrong.
53 // TODO(sky): we need to transform for device scale though.
54 dispatcher()->set_transform_events(false);
55 compositor()->SetHostHasTransparentBackground(true); 50 compositor()->SetHostHasTransparentBackground(true);
56 51
57 input_method_ = base::MakeUnique<InputMethodMus>(this, window); 52 input_method_ = base::MakeUnique<InputMethodMus>(this, window);
58 SetSharedInputMethod(input_method_.get()); 53 SetSharedInputMethod(input_method_.get());
59 } 54 }
60 55
61 WindowTreeHostMus::~WindowTreeHostMus() { 56 WindowTreeHostMus::~WindowTreeHostMus() {
62 DestroyCompositor(); 57 DestroyCompositor();
63 DestroyDispatcher(); 58 DestroyDispatcher();
64 } 59 }
(...skipping 28 matching lines...) Expand all
93 void WindowTreeHostMus::OnCloseRequest() { 88 void WindowTreeHostMus::OnCloseRequest() {
94 OnHostCloseRequested(); 89 OnHostCloseRequested();
95 } 90 }
96 91
97 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { 92 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() {
98 // TODO: This should read the profile from mus. crbug.com/647510 93 // TODO: This should read the profile from mus. crbug.com/647510
99 return gfx::ICCProfile(); 94 return gfx::ICCProfile();
100 } 95 }
101 96
102 } // namespace views 97 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698