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 #ifndef UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_DELEGATE_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_DELEGATE_H_ |
| 7 |
| 8 #include "ui/gfx/native_widget_types.h" |
| 9 |
| 10 namespace gfx { |
| 11 class Rect; |
| 12 } // namespace gfx |
| 13 |
| 14 namespace ui { |
| 15 |
| 16 class HardwareDisplayController; |
| 17 |
| 18 // This is a bridge between the browser process and the GPU process for a native |
| 19 // window. Since display configuration is done on the GPU process, it needs to |
| 20 // know where the native windows are located such that it can map them to a |
| 21 // hardware display controller. |
| 22 class NativeWindowDelegate { |
| 23 public: |
| 24 virtual ~NativeWindowDelegate() {} |
| 25 |
| 26 // Returns the accelerated widget associated with the delegate. |
| 27 virtual gfx::AcceleratedWidget GetWidget() = 0; |
| 28 |
| 29 // Returns the current controller the window is displaying on. Callers should |
| 30 // not cache the result as the controller may change as the window is moved. |
| 31 virtual HardwareDisplayController* GetController() = 0; |
| 32 |
| 33 // Called when the window is resized/moved. |
| 34 virtual void OnBoundsChanged(const gfx::Rect& bounds) = 0; |
| 35 }; |
| 36 |
| 37 } // namespace ui |
| 38 |
| 39 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_WINDOW_DELEGATE_H_ |
OLD | NEW |