Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: components/mus/ws/server_window_observer.h

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 COMPONENTS_MUS_WS_SERVER_WINDOW_OBSERVER_H_
6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_OBSERVER_H_
7
8 #include <stdint.h>
9
10 #include <string>
11 #include <vector>
12
13 #include "components/mus/public/interfaces/mus_constants.mojom.h"
14
15 namespace gfx {
16 class Insets;
17 class Rect;
18 }
19
20 namespace ui {
21 struct TextInputState;
22 }
23
24 namespace mus {
25
26 namespace ws {
27
28 class ServerWindow;
29
30 // TODO(sky): rename to OnDid and OnWill everywhere.
31 class ServerWindowObserver {
32 public:
33 // Invoked when a window is about to be destroyed; before any of the children
34 // have been removed and before the window has been removed from its parent.
35 virtual void OnWindowDestroying(ServerWindow* window) {}
36
37 // Invoked at the end of the window's destructor (after it has been removed
38 // from the hierarchy.
39 virtual void OnWindowDestroyed(ServerWindow* window) {}
40
41 virtual void OnWillChangeWindowHierarchy(ServerWindow* window,
42 ServerWindow* new_parent,
43 ServerWindow* old_parent) {}
44
45 virtual void OnWindowHierarchyChanged(ServerWindow* window,
46 ServerWindow* new_parent,
47 ServerWindow* old_parent) {}
48
49 virtual void OnWindowBoundsChanged(ServerWindow* window,
50 const gfx::Rect& old_bounds,
51 const gfx::Rect& new_bounds) {}
52
53 virtual void OnWindowClientAreaChanged(
54 ServerWindow* window,
55 const gfx::Insets& new_client_area,
56 const std::vector<gfx::Rect>& new_additional_client_areas) {}
57
58 virtual void OnWindowReordered(ServerWindow* window,
59 ServerWindow* relative,
60 mojom::OrderDirection direction) {}
61
62 virtual void OnWillChangeWindowVisibility(ServerWindow* window) {}
63 virtual void OnWindowVisibilityChanged(ServerWindow* window) {}
64 virtual void OnWindowOpacityChanged(ServerWindow* window,
65 float old_opacity,
66 float new_opacity) {}
67
68 virtual void OnWindowPredefinedCursorChanged(ServerWindow* window,
69 int32_t cursor_id) {}
70 virtual void OnWindowNonClientCursorChanged(ServerWindow* window,
71 int32_t cursor_id) {}
72
73 virtual void OnWindowTextInputStateChanged(ServerWindow* window,
74 const ui::TextInputState& state) {}
75
76 virtual void OnWindowSharedPropertyChanged(
77 ServerWindow* window,
78 const std::string& name,
79 const std::vector<uint8_t>* new_data) {}
80
81 // Called when a transient child is added to |window|.
82 virtual void OnTransientWindowAdded(ServerWindow* window,
83 ServerWindow* transient_child) {}
84
85 // Called when a transient child is removed from |window|.
86 virtual void OnTransientWindowRemoved(ServerWindow* window,
87 ServerWindow* transient_child) {}
88
89 protected:
90 virtual ~ServerWindowObserver() {}
91 };
92
93 } // namespace ws
94
95 } // namespace mus
96
97 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_OBSERVER_H_
OLDNEW
« no previous file with comments | « components/mus/ws/server_window_drawn_tracker_unittest.cc ('k') | components/mus/ws/server_window_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698