Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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(nullptr))); |
| 57 // Initialize the stub platform window bounds to those of the mus::Window. | |
| 58 platform_window()->SetBounds(window->bounds()); | |
|
sky
2016/06/03 22:12:52
This seems right to me. I see another bug, will fi
| |
| 57 | 59 |
| 58 // The location of events is already transformed, and there is no way to | 60 // The location of events is already transformed, and there is no way to |
| 59 // correctly determine the reverse transform. So, don't attempt to transform | 61 // correctly determine the reverse transform. So, don't attempt to transform |
| 60 // event locations, else the root location is wrong. | 62 // event locations, else the root location is wrong. |
| 61 // TODO(sky): we need to transform for device scale though. | 63 // TODO(sky): we need to transform for device scale though. |
| 62 dispatcher()->set_transform_events(false); | 64 dispatcher()->set_transform_events(false); |
| 63 compositor()->SetHostHasTransparentBackground(true); | 65 compositor()->SetHostHasTransparentBackground(true); |
| 64 | 66 |
| 65 input_method_.reset(new InputMethodMUS(this, window)); | 67 input_method_.reset(new InputMethodMUS(this, window)); |
| 66 SetSharedInputMethod(input_method_.get()); | 68 SetSharedInputMethod(input_method_.get()); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 93 if (native_widget_) | 95 if (native_widget_) |
| 94 native_widget_->OnActivationChanged(active); | 96 native_widget_->OnActivationChanged(active); |
| 95 WindowTreeHostPlatform::OnActivationChanged(active); | 97 WindowTreeHostPlatform::OnActivationChanged(active); |
| 96 } | 98 } |
| 97 | 99 |
| 98 void WindowTreeHostMus::OnCloseRequest() { | 100 void WindowTreeHostMus::OnCloseRequest() { |
| 99 OnHostCloseRequested(); | 101 OnHostCloseRequested(); |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace views | 104 } // namespace views |
| OLD | NEW |