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

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: Set delegate in StubWindow to enable normal flow for notifying OnBoundsChanged 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
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/bitmap_uploader/bitmap_uploader.h" 8 #include "components/bitmap_uploader/bitmap_uploader.h"
9 #include "components/mus/public/cpp/window.h" 9 #include "components/mus/public/cpp/window.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // example, in some unit test contexts. 46 // example, in some unit test contexts.
47 if (connector) { 47 if (connector) {
48 bitmap_uploader_.reset(new bitmap_uploader::BitmapUploader(window)); 48 bitmap_uploader_.reset(new bitmap_uploader::BitmapUploader(window));
49 bitmap_uploader_->Init(connector); 49 bitmap_uploader_->Init(connector);
50 prop_.reset( 50 prop_.reset(
51 new ui::ViewProp(accelerated_widget, 51 new ui::ViewProp(accelerated_widget,
52 bitmap_uploader::kBitmapUploaderForAcceleratedWidget, 52 bitmap_uploader::kBitmapUploaderForAcceleratedWidget,
53 bitmap_uploader_.get())); 53 bitmap_uploader_.get()));
54 } 54 }
55 55
56 SetPlatformWindow(base::WrapUnique(new ui::StubWindow(nullptr))); 56 SetPlatformWindow(base::WrapUnique(new ui::StubWindow(
57 this,
58 false))); // Do not advertise accelerated widget; already set manually.
59
57 // Initialize the stub platform window bounds to those of the mus::Window. 60 // Initialize the stub platform window bounds to those of the mus::Window.
58 platform_window()->SetBounds(window->bounds()); 61 platform_window()->SetBounds(window->bounds());
59 62
60 // The location of events is already transformed, and there is no way to 63 // The location of events is already transformed, and there is no way to
61 // correctly determine the reverse transform. So, don't attempt to transform 64 // correctly determine the reverse transform. So, don't attempt to transform
62 // event locations, else the root location is wrong. 65 // event locations, else the root location is wrong.
63 // TODO(sky): we need to transform for device scale though. 66 // TODO(sky): we need to transform for device scale though.
64 dispatcher()->set_transform_events(false); 67 dispatcher()->set_transform_events(false);
65 compositor()->SetHostHasTransparentBackground(true); 68 compositor()->SetHostHasTransparentBackground(true);
66 69
(...skipping 28 matching lines...) Expand all
95 if (native_widget_) 98 if (native_widget_)
96 native_widget_->OnActivationChanged(active); 99 native_widget_->OnActivationChanged(active);
97 WindowTreeHostPlatform::OnActivationChanged(active); 100 WindowTreeHostPlatform::OnActivationChanged(active);
98 } 101 }
99 102
100 void WindowTreeHostMus::OnCloseRequest() { 103 void WindowTreeHostMus::OnCloseRequest() {
101 OnHostCloseRequested(); 104 OnHostCloseRequested();
102 } 105 }
103 106
104 } // namespace views 107 } // namespace views
OLDNEW
« ui/platform_window/stub/stub_window.h ('K') | « 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