1116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch// Copyright 2014 The Chromium Authors. All rights reserved.
2116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch// Use of this source code is governed by a BSD-style license that can be
3116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch// found in the LICENSE file.
4116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
5116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
6116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
7116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
8116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch#include "ui/gfx/native_widget_types.h"
9116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
10116680a4aac90f2aa7413d9095a592090648e557Ben Murdochnamespace gfx {
11116680a4aac90f2aa7413d9095a592090648e557Ben Murdochclass Rect;
12116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch}
13116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
14116680a4aac90f2aa7413d9095a592090648e557Ben Murdochnamespace ui {
15116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
16116680a4aac90f2aa7413d9095a592090648e557Ben Murdochclass Event;
17116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
18116680a4aac90f2aa7413d9095a592090648e557Ben Murdochenum PlatformWindowState {
19116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  PLATFORM_WINDOW_STATE_UNKNOWN,
20116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  PLATFORM_WINDOW_STATE_MAXIMIZED,
21116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  PLATFORM_WINDOW_STATE_MINIMIZED,
22116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  PLATFORM_WINDOW_STATE_NORMAL,
23116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  PLATFORM_WINDOW_STATE_FULLSCREEN,
24116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch};
25116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
265f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)class PlatformWindowDelegate {
27116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch public:
28116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual ~PlatformWindowDelegate() {}
29116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
30116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  // Note that |new_bounds| is in physical screen coordinates.
31116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnBoundsChanged(const gfx::Rect& new_bounds) = 0;
32116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
33116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  // Note that |damaged_region| is in the platform-window's coordinates, in
34116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  // physical pixels.
35116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnDamageRect(const gfx::Rect& damaged_region) = 0;
36116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
37116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void DispatchEvent(Event* event) = 0;
38116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
39116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnCloseRequest() = 0;
40116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnClosed() = 0;
41116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
42116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnWindowStateChanged(PlatformWindowState new_state) = 0;
43116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
44116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnLostCapture() = 0;
45116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
46116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0;
475f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
485f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  virtual void OnActivationChanged(bool active) = 0;
49116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch};
50116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
51116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch}  // namespace ui
52116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
53116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch#endif  // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
54