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#ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ 6#define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ 7 8#include "base/memory/weak_ptr.h" 9#include "ui/gfx/native_widget_types.h" 10#include "ui/ozone/platform/dri/dri_window_delegate.h" 11 12namespace gfx { 13class Rect; 14} // namespace gfx 15 16namespace ui { 17 18class HardwareDisplayController; 19class ScreenManager; 20 21class DriWindowDelegateImpl : public DriWindowDelegate { 22 public: 23 DriWindowDelegateImpl(gfx::AcceleratedWidget widget, 24 ScreenManager* screen_manager); 25 virtual ~DriWindowDelegateImpl(); 26 27 // DriWindowDelegate: 28 virtual void Initialize() OVERRIDE; 29 virtual void Shutdown() OVERRIDE; 30 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 31 virtual HardwareDisplayController* GetController() OVERRIDE; 32 virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE; 33 34 private: 35 gfx::AcceleratedWidget widget_; 36 37 ScreenManager* screen_manager_; // Not owned. 38 39 base::WeakPtr<HardwareDisplayController> controller_; 40 41 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl); 42}; 43 44} // namespace ui 45 46#endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ 47