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

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

Issue 2040783002: Drop unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « ui/views/mus/native_widget_mus.cc ('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 "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 "components/mus/public/cpp/window.h" 8 #include "components/mus/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 20 matching lines...) Expand all
31 #if defined(OS_WIN) || defined(OS_ANDROID) 31 #if defined(OS_WIN) || defined(OS_ANDROID)
32 gfx::AcceleratedWidget accelerated_widget = 32 gfx::AcceleratedWidget accelerated_widget =
33 reinterpret_cast<gfx::AcceleratedWidget>(accelerated_widget_count++); 33 reinterpret_cast<gfx::AcceleratedWidget>(accelerated_widget_count++);
34 #else 34 #else
35 gfx::AcceleratedWidget accelerated_widget = 35 gfx::AcceleratedWidget accelerated_widget =
36 static_cast<gfx::AcceleratedWidget>(accelerated_widget_count++); 36 static_cast<gfx::AcceleratedWidget>(accelerated_widget_count++);
37 #endif 37 #endif
38 // TODO(markdittmer): Use correct device-scale-factor from |window|. 38 // TODO(markdittmer): Use correct device-scale-factor from |window|.
39 OnAcceleratedWidgetAvailable(accelerated_widget, 1.f); 39 OnAcceleratedWidgetAvailable(accelerated_widget, 1.f);
40 40
41 SetPlatformWindow(base::WrapUnique(new ui::StubWindow(nullptr))); 41 SetPlatformWindow(base::WrapUnique(new ui::StubWindow(
42 this,
43 false))); // Do not advertise accelerated widget; already set manually.
44
42 // Initialize the stub platform window bounds to those of the mus::Window. 45 // Initialize the stub platform window bounds to those of the mus::Window.
43 platform_window()->SetBounds(window->bounds()); 46 platform_window()->SetBounds(window->bounds());
44 47
45 // The location of events is already transformed, and there is no way to 48 // The location of events is already transformed, and there is no way to
46 // correctly determine the reverse transform. So, don't attempt to transform 49 // correctly determine the reverse transform. So, don't attempt to transform
47 // event locations, else the root location is wrong. 50 // event locations, else the root location is wrong.
48 // TODO(sky): we need to transform for device scale though. 51 // TODO(sky): we need to transform for device scale though.
49 dispatcher()->set_transform_events(false); 52 dispatcher()->set_transform_events(false);
50 compositor()->SetHostHasTransparentBackground(true); 53 compositor()->SetHostHasTransparentBackground(true);
51 54
(...skipping 28 matching lines...) Expand all
80 if (native_widget_) 83 if (native_widget_)
81 native_widget_->OnActivationChanged(active); 84 native_widget_->OnActivationChanged(active);
82 WindowTreeHostPlatform::OnActivationChanged(active); 85 WindowTreeHostPlatform::OnActivationChanged(active);
83 } 86 }
84 87
85 void WindowTreeHostMus::OnCloseRequest() { 88 void WindowTreeHostMus::OnCloseRequest() {
86 OnHostCloseRequested(); 89 OnHostCloseRequested();
87 } 90 }
88 91
89 } // namespace views 92 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/native_widget_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698