1ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com// Copyright 2014 The Chromium Authors. All rights reserved.
2ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com// Use of this source code is governed by a BSD-style license that can be
3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com// found in the LICENSE file.
4ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com
5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
6ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
7ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com
8ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com#include "ui/gfx/native_widget_types.h"
98a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comnamespace gfx {
118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass Rect;
128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com}
138a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
148a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comnamespace ui {
158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
168a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass Event;
178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
188a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comenum PlatformWindowState {
198a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  PLATFORM_WINDOW_STATE_UNKNOWN,
208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  PLATFORM_WINDOW_STATE_MAXIMIZED,
218a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  PLATFORM_WINDOW_STATE_MINIMIZED,
228a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  PLATFORM_WINDOW_STATE_NORMAL,
238a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  PLATFORM_WINDOW_STATE_FULLSCREEN,
248a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com};
258a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass PlatformWindowDelegate {
278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com public:
288a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual ~PlatformWindowDelegate() {}
298a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
308a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  // Note that |new_bounds| is in physical screen coordinates.
318a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void OnBoundsChanged(const gfx::Rect& new_bounds) = 0;
328a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
338a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  // Note that |damaged_region| is in the platform-window's coordinates, in
348a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  // physical pixels.
358a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void OnDamageRect(const gfx::Rect& damaged_region) = 0;
368a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
378a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void DispatchEvent(Event* event) = 0;
388a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
398a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void OnCloseRequest() = 0;
408a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void OnClosed() = 0;
418a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
428a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void OnWindowStateChanged(PlatformWindowState new_state) = 0;
438a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
448a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com  virtual void OnLostCapture() = 0;
45
46  virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0;
47
48  virtual void OnActivationChanged(bool active) = 0;
49};
50
51}  // namespace ui
52
53#endif  // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
54