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.
5 #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
6 #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
8 #include "ui/gfx/native_widget_types.h"
18 enum PlatformWindowState
{
19 PLATFORM_WINDOW_STATE_UNKNOWN
,
20 PLATFORM_WINDOW_STATE_MAXIMIZED
,
21 PLATFORM_WINDOW_STATE_MINIMIZED
,
22 PLATFORM_WINDOW_STATE_NORMAL
,
23 PLATFORM_WINDOW_STATE_FULLSCREEN
,
26 class PlatformWindowDelegate
{
28 virtual ~PlatformWindowDelegate() {}
30 // Note that |new_bounds| is in physical screen coordinates.
31 virtual void OnBoundsChanged(const gfx::Rect
& new_bounds
) = 0;
33 // Note that |damaged_region| is in the platform-window's coordinates, in
35 virtual void OnDamageRect(const gfx::Rect
& damaged_region
) = 0;
37 virtual void DispatchEvent(Event
* event
) = 0;
39 virtual void OnCloseRequest() = 0;
40 virtual void OnClosed() = 0;
42 virtual void OnWindowStateChanged(PlatformWindowState new_state
) = 0;
44 virtual void OnLostCapture() = 0;
46 virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget
) = 0;
48 virtual void OnActivationChanged(bool active
) = 0;
53 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_