Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / platform_window / platform_window_delegate.h
blob67c63a7e5e41f94f9c69ddbe32ff7bd415e7755a
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"
10 namespace gfx {
11 class Rect;
14 namespace ui {
16 class Event;
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 {
27 public:
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
34 // physical pixels.
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,
47 float device_pixel_ratio) = 0;
49 virtual void OnActivationChanged(bool active) = 0;
52 } // namespace ui
54 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_