OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/ozone/platform/dri/native_window_delegate_impl.h" |
| 6 |
| 7 #include "ui/ozone/platform/dri/native_window_manager.h" |
| 8 #include "ui/ozone/platform/dri/screen_manager.h" |
| 9 |
| 10 namespace ui { |
| 11 |
| 12 NativeWindowDelegateImpl::NativeWindowDelegateImpl( |
| 13 gfx::AcceleratedWidget widget, |
| 14 NativeWindowManager* window_manager, |
| 15 ScreenManager* screen_manager) |
| 16 : widget_(widget), |
| 17 window_manager_(window_manager), |
| 18 screen_manager_(screen_manager) { |
| 19 window_manager_->AddNativeWindowDelegate(widget_, this); |
| 20 } |
| 21 |
| 22 NativeWindowDelegateImpl::~NativeWindowDelegateImpl() { |
| 23 window_manager_->RemoveNativeWindowDelegate(widget_); |
| 24 } |
| 25 |
| 26 gfx::AcceleratedWidget NativeWindowDelegateImpl::GetWidget() { |
| 27 return widget_; |
| 28 } |
| 29 |
| 30 HardwareDisplayController* NativeWindowDelegateImpl::GetController() { |
| 31 return controller_.get(); |
| 32 } |
| 33 |
| 34 void NativeWindowDelegateImpl::OnBoundsChanged(const gfx::Rect& bounds) { |
| 35 controller_ = screen_manager_->GetDisplayController(bounds); |
| 36 } |
| 37 |
| 38 } // namespace ui |
OLD | NEW |