| Index: ui/ozone/platform/dri/native_window_delegate_impl.cc
|
| diff --git a/ui/ozone/platform/dri/native_window_delegate_impl.cc b/ui/ozone/platform/dri/native_window_delegate_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..74b452891178cf4765e961d7f94ee0402c690125
|
| --- /dev/null
|
| +++ b/ui/ozone/platform/dri/native_window_delegate_impl.cc
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/ozone/platform/dri/native_window_delegate_impl.h"
|
| +
|
| +#include "ui/ozone/platform/dri/native_window_manager.h"
|
| +#include "ui/ozone/platform/dri/screen_manager.h"
|
| +
|
| +namespace ui {
|
| +
|
| +NativeWindowDelegateImpl::NativeWindowDelegateImpl(
|
| + gfx::AcceleratedWidget widget,
|
| + NativeWindowManager* window_manager,
|
| + ScreenManager* screen_manager)
|
| + : widget_(widget),
|
| + window_manager_(window_manager),
|
| + screen_manager_(screen_manager) {
|
| + window_manager_->AddNativeWindowDelegate(widget_, this);
|
| +}
|
| +
|
| +NativeWindowDelegateImpl::~NativeWindowDelegateImpl() {
|
| + window_manager_->RemoveNativeWindowDelegate(widget_);
|
| +}
|
| +
|
| +gfx::AcceleratedWidget NativeWindowDelegateImpl::GetWidget() {
|
| + return widget_;
|
| +}
|
| +
|
| +HardwareDisplayController* NativeWindowDelegateImpl::GetController() {
|
| + return controller_.get();
|
| +}
|
| +
|
| +void NativeWindowDelegateImpl::OnBoundsChanged(const gfx::Rect& bounds) {
|
| + controller_ = screen_manager_->GetDisplayController(bounds);
|
| +}
|
| +
|
| +} // namespace ui
|
|
|